From 3809f06ae87ceebcbfc26bec1bfb2ac10ed112a0 Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 23 Aug 2024 15:44:28 +0200 Subject: [PATCH] when looking back camera momentum should inherit the mom of the player makes using shoes or any boost stuff less jarring when looking back --- src/p_user.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/p_user.c b/src/p_user.c index a6f5b262f..81d054e95 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3875,6 +3875,15 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall { thiscam->momx = x - thiscam->x; thiscam->momy = y - thiscam->y; + + // when looking back, camera's momentum + // should inherit the momentum of the player + if (lookback && lookbackdelay[num]) + { + thiscam->momx += mo->momx; + thiscam->momy += mo->momy; + } + thiscam->momz = FixedMul(z - thiscam->z, camspeed/2); }