From dddc992e24f5011ccdd3cbff96605496831320ab Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Wed, 1 Mar 2023 22:24:42 -0500 Subject: [PATCH] Fix camera tilting in podium --- src/p_tick.c | 10 ++++++---- src/r_main.c | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/p_tick.c b/src/p_tick.c index 4d780d9a6..9b4e987bf 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -795,10 +795,12 @@ void P_Ticker(boolean run) } } - K_UpdateDirector(); - - // Always move the camera. - P_RunChaseCameras(); + if (gamestate == GS_LEVEL) + { + // Move the camera during levels. + K_UpdateDirector(); + P_RunChaseCameras(); + } LUA_HOOK(PostThinkFrame); diff --git a/src/r_main.c b/src/r_main.c index ded540741..0dfe36d38 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -928,7 +928,22 @@ void R_ApplyViewMorph(int s) angle_t R_ViewRollAngle(const player_t *player) { - angle_t roll = player->viewrollangle; + angle_t roll = 0; + + if (gamestate != GS_LEVEL) + { + // FIXME: The way this is implemented is totally + // incompatible with cameras that aren't directly + // tied to the player. (podium, titlemap, + // MT_ALTVIEWMAN in general) + + // All of these player variables should affect their + // camera_t in P_MoveChaseCamera, and then this + // just returns that variable instead. + return 0; + } + + roll = player->viewrollangle; if (cv_tilting.value) {