Disable camera dampening when looking backwards.

When traveling quickly, camera dampening normally causes the camera to get
further away from the player, but it screws up camera angles when looking
backwards.

This change causes camera dampening to happen instantly when looking behind.
That way, players can expect the camera to always be in a consistent location
when they tap the "look behind" button.
This commit is contained in:
Kimberly Wilber 2024-06-15 13:54:42 -04:00
parent 03241a13c5
commit c62dfa20d2

View file

@ -3622,6 +3622,14 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
thiscam->momx = x - thiscam->x;
thiscam->momy = y - thiscam->y;
if (lookback && lookbackdelay[num]) {
// when looking back, camera's momentum
// should inherit the momentum of the player
// plus extra
thiscam->momx += 2*mo->momx;
thiscam->momy += 2*mo->momy;
}
fixed_t z_speed = Easing_Linear(
player->karthud[khud_aircam],
camspeed * 3 / 5,