From 60473e96d02e0cf2d94f6b7c744cefac143870ea Mon Sep 17 00:00:00 2001 From: James R Date: Wed, 13 Mar 2024 02:09:17 -0700 Subject: [PATCH 1/2] Loop camera: do not reverse panning direction based on player camera --- src/p_user.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/p_user.c b/src/p_user.c index 63bfe58ba..81c3f9a7c 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3304,10 +3304,21 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall if (turn > turnspeed) { + // TODO: this code let the panning angle flip + // depending on your camera angle when entering + // the loop. + // It caused just about every loop to look weird + // sometimes, since the camera could move + // differently than configured. + // I don't know if this behavior should ever come + // back, but in case it should, I'm leaving this + // comment here. +#if 0 if (turn < ANGLE_90) { turnspeed = -(turnspeed); } +#endif focusangle += turnspeed; } From 1871de39e2df5ab3a2ba906096d4deaad61bafb3 Mon Sep 17 00:00:00 2001 From: James R Date: Wed, 13 Mar 2024 02:09:33 -0700 Subject: [PATCH 2/2] Loop camera: do not pan with drifts This would offset the camera in loops. Bad since they sometimes have very specific parameters. --- src/p_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index 81c3f9a7c..02eaa62fd 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3473,7 +3473,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall y = mo->y - FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), distxy); // SRB2Kart: set camera panning - if (camstill || resetcalled || player->playerstate == PST_DEAD) + if (camstill || resetcalled || player->playerstate == PST_DEAD || player->loop.radius) pan = xpan = ypan = 0; else {