Tweaks to camera shifting

This commit is contained in:
fickleheart 2019-12-13 20:17:31 -06:00
parent 022a44fb01
commit f82f1513ba

View file

@ -10012,7 +10012,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
}
}
if (cv_abilitydirection[(thiscam == &camera) ? 0 : 1].value)
if (cv_abilitydirection[(thiscam == &camera) ? 0 : 1].value && !sign)
{
// Shift the camera slightly to the sides depending on the player facing direction
UINT8 forplayer = (thiscam == &camera) ? 0 : 1;
@ -10021,6 +10021,12 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
if (player->powers[pw_carry] == CR_ROLLOUT)
shift = -shift;
if (player->powers[pw_carry] == CR_NIGHTSMODE)
{
fixed_t cos = FINECOSINE((angle_t) (player->flyangle * ANG1)>>ANGLETOFINESHIFT);
shift = FixedMul(shift, min(FRACUNIT, player->speed*abs(cos)/6000));
}
if (ticcmd_centerviewdown[(thiscam == &camera) ? 0 : 1])
shift = FixedMul(camsideshift[forplayer], FRACUNIT-camspeed);
else