mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-16 01:31:30 +00:00
Fix RVZ camera stuff
This commit is contained in:
parent
2ab83bac60
commit
f74d7163e6
2 changed files with 6 additions and 2 deletions
|
@ -1033,6 +1033,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
angle_t *myangle = (ssplayer == 1 ? &localangle : &localangle2);
|
||||
INT32 *myaiming = (ssplayer == 1 ? &localaiming : &localaiming2);
|
||||
|
||||
angle_t drawangleoffset = (player->powers[pw_carry] == CR_ROLLOUT) ? ANGLE_180 : 0;
|
||||
INT32 chasecam, chasefreelook, alwaysfreelook, usejoystick, analog, invertmouse, mousemove, abilitydirection;
|
||||
INT32 *mx; INT32 *my; INT32 *mly;
|
||||
|
||||
|
@ -1445,7 +1446,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
cmd->sidemove = 0;
|
||||
}
|
||||
else
|
||||
cmd->angleturn = (player->drawangle>>16);
|
||||
cmd->angleturn = (player->drawangle+drawangleoffset)>>16;
|
||||
}
|
||||
|
||||
// Adjust camera angle to face player direction, depending on circumstances
|
||||
|
@ -1463,7 +1464,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
|
||||
if (camadjustfactor)
|
||||
{
|
||||
INT32 anglediff = player->drawangle - *myangle;
|
||||
INT32 anglediff = player->drawangle + drawangleoffset - *myangle;
|
||||
|
||||
*myangle += FixedMul(anglediff, camadjustfactor);
|
||||
}
|
||||
|
|
|
@ -9902,6 +9902,9 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
UINT8 forplayer = (thiscam == &camera) ? 0 : 1;
|
||||
fixed_t shift = FixedMul(FINESINE((player->drawangle - angle) >> ANGLETOFINESHIFT), cv_cam_shiftfacing[forplayer].value);
|
||||
|
||||
if (player->powers[pw_carry] == CR_ROLLOUT)
|
||||
shift = -shift;
|
||||
|
||||
if (ticcmd_resetdown[(thiscam == &camera) ? 0 : 1])
|
||||
shift = FixedMul(camsideshift[forplayer], FRACUNIT-camspeed);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue