From 8730bd9dda996ee98ee10a983c00e25f2448d660 Mon Sep 17 00:00:00 2001 From: Mitchell Richters <mjr4077au@gmail.com> Date: Thu, 7 May 2020 09:39:48 +1000 Subject: [PATCH] - allow game's clock to keep running while paused (restores interpolations/animations in menus). --- source/duke3d/src/game.cpp | 2 +- source/exhumed/src/exhumed.cpp | 2 +- source/rr/src/game.cpp | 2 +- source/sw/src/game.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 347d0a84f..d82925505 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -5911,7 +5911,7 @@ MAIN_LOOP_RESTART: if (M_Active() || GUICapture || ud.pause_on != 0) { - totalclock = ototalclock + TICSPERFRAME; + ototalclock = totalclock - TICSPERFRAME; buttonMap.ResetButtonStates(); } else diff --git a/source/exhumed/src/exhumed.cpp b/source/exhumed/src/exhumed.cpp index 0499e3354..15db09f81 100644 --- a/source/exhumed/src/exhumed.cpp +++ b/source/exhumed/src/exhumed.cpp @@ -2339,7 +2339,7 @@ GAMELOOP: if (M_Active() || GUICapture || bPause) { - totalclock = tclocks + 4; + tclocks = totalclock - 4; buttonMap.ResetButtonStates(); } else diff --git a/source/rr/src/game.cpp b/source/rr/src/game.cpp index e16627068..581e98ddc 100644 --- a/source/rr/src/game.cpp +++ b/source/rr/src/game.cpp @@ -7294,7 +7294,7 @@ MAIN_LOOP_RESTART: if (M_Active() || GUICapture || ud.pause_on != 0) { - totalclock = ototalclock + TICSPERFRAME; + ototalclock = totalclock - TICSPERFRAME; buttonMap.ResetButtonStates(); } else diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index b39ba19bc..c0bdb9a2b 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -2528,7 +2528,7 @@ void RunLevel(void) if (M_Active() || GUICapture || GamePaused) { - totalclock = ototalclock + (120 / synctics); + ototalclock = (int)totalclock - (120 / synctics); buttonMap.ResetButtonStates(); } else