Fix strange camera turn during teleports
This commit is contained in:
parent
979436c253
commit
19b3eea36f
2 changed files with 11 additions and 3 deletions
|
|
@ -125,6 +125,8 @@ boolean P_Teleport(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle
|
|||
if (!P_SetOrigin(thing, x, y, z))
|
||||
return false;
|
||||
|
||||
thing->angle = angle;
|
||||
|
||||
if (!dontstopmove)
|
||||
thing->momx = thing->momy = thing->momz = 0;
|
||||
else // Change speed to match direction
|
||||
|
|
@ -137,6 +139,9 @@ boolean P_Teleport(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle
|
|||
else
|
||||
thing->player->viewz = thing->z + thing->player->viewheight;
|
||||
|
||||
{// absolute angle position
|
||||
P_SetPlayerAngle(thing->player, angle);}
|
||||
|
||||
// don't run in place after a teleport
|
||||
if (!dontstopmove)
|
||||
{
|
||||
|
|
@ -152,9 +157,6 @@ boolean P_Teleport(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle
|
|||
else
|
||||
thing->player->drawangle += (angle - thing->angle);
|
||||
|
||||
// absolute angle position
|
||||
P_SetPlayerAngle(thing->player, angle);
|
||||
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
{
|
||||
if (thing == players[displayplayers[i]].mo)
|
||||
|
|
@ -171,6 +173,8 @@ boolean P_Teleport(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle
|
|||
}
|
||||
}
|
||||
|
||||
thing->player->boostangle = angle;
|
||||
|
||||
if (flash)
|
||||
P_FlashPal(thing->player, PAL_MIXUP, 10);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4730,6 +4730,10 @@ void P_ForceLocalAngle(player_t *player, angle_t angle)
|
|||
if (player == &players[displayplayers[i]])
|
||||
{
|
||||
localangle[i] = angle;
|
||||
if (camera[i].chase)
|
||||
P_ResetCamera(player, &camera[i]);
|
||||
|
||||
R_ResetViewInterpolation(i + 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue