mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-01 06:00:45 +00:00
Tweaks to camera shifting
This commit is contained in:
parent
022a44fb01
commit
f82f1513ba
1 changed files with 7 additions and 1 deletions
|
@ -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
|
// Shift the camera slightly to the sides depending on the player facing direction
|
||||||
UINT8 forplayer = (thiscam == &camera) ? 0 : 1;
|
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)
|
if (player->powers[pw_carry] == CR_ROLLOUT)
|
||||||
shift = -shift;
|
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])
|
if (ticcmd_centerviewdown[(thiscam == &camera) ? 0 : 1])
|
||||||
shift = FixedMul(camsideshift[forplayer], FRACUNIT-camspeed);
|
shift = FixedMul(camsideshift[forplayer], FRACUNIT-camspeed);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue