From 4384577034e0de5fc5fb949aa23018378c36e9d7 Mon Sep 17 00:00:00 2001 From: James R Date: Mon, 1 Apr 2024 17:28:27 -0700 Subject: [PATCH] Do not pause 3d rendering ever in replays It interferes with the "Advance Frame" button. --- src/d_main.cpp | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index 7de6a2341..bff498a6d 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -1018,16 +1018,26 @@ void D_SRB2Loop(void) } return true; }; - // 3D rendering is stopped ENTIRELY if the game is paused. - // - In single player, opening the menu pauses the game, so it's perfect. - // - One exception: freecam is allowed to move when the game is paused. - if (((paused || P_AutoPause()) && none_freecam()) || - // 3D framerate is always allowed to at least drop if the menu is open. - // Does not affect replay menu because that one is more like a HUD. - (skiplaggyworld && menuactive && currentMenu != &PAUSE_PlaybackMenuDef)) + auto can_skip = [&] { + // Would interfere with "Advanced Frame" button in replays. + if (demo.playback) + return false; + + // 3D rendering is stopped ENTIRELY if the game is paused. + // - In single player, opening the menu pauses the game, so it's perfect. + // - One exception: freecam is allowed to move when the game is paused. + if ((paused || P_AutoPause()) && none_freecam()) + return true; + + // 3D framerate is always allowed to at least drop if the menu is open. + if (skiplaggyworld && menuactive) + return true; + + return false; + }; + if (can_skip()) world = false; - } } ranwipe = D_Display(world);