Fix RVZ camera stuff

This commit is contained in:
fickleheart 2019-12-11 01:26:43 -06:00
parent 2ab83bac60
commit f74d7163e6
2 changed files with 6 additions and 2 deletions

View file

@ -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);
}

View file

@ -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