From d994369fd0ae8ad7028694118dd69d77591a8752 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 24 May 2021 20:34:01 +0200 Subject: [PATCH] - timer code fixes. --- src/common/cutscenes/movieplayer.cpp | 2 ++ src/common/cutscenes/screenjob.cpp | 4 +--- src/common/cutscenes/screenjob.h | 2 -- src/common/engine/gamestate.h | 1 - 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/common/cutscenes/movieplayer.cpp b/src/common/cutscenes/movieplayer.cpp index e2e2ec24c..8ea3967c5 100644 --- a/src/common/cutscenes/movieplayer.cpp +++ b/src/common/cutscenes/movieplayer.cpp @@ -797,7 +797,9 @@ DEFINE_ACTION_FUNCTION(_MoviePlayer, Create) DEFINE_ACTION_FUNCTION(_MoviePlayer, Start) { PARAM_SELF_STRUCT_PROLOGUE(MoviePlayer); + I_FreezeTime(true); self->Start(); + I_FreezeTime(false); return 0; } diff --git a/src/common/cutscenes/screenjob.cpp b/src/common/cutscenes/screenjob.cpp index a3978298e..9b0b3ca8f 100644 --- a/src/common/cutscenes/screenjob.cpp +++ b/src/common/cutscenes/screenjob.cpp @@ -59,7 +59,6 @@ PClass* runnerclass; PType* runnerclasstype; CompletionFunc completion; static int ticks; -int intermissiondelay; //============================================================================= // @@ -287,6 +286,7 @@ bool ScreenJobValidate() VMValue parm[] = { runner }; VMReturn ret(&res); VMCall(func, parm, 1, &ret, 1); + I_ResetFrameTime(); return res; } } @@ -315,8 +315,6 @@ bool StartCutscene(CutsceneDef& cs, int flags, const CompletionFunc& completion_ runner = nullptr; return false; } - if (flags & SJ_DELAY) intermissiondelay = 10; // need to wait a bit at the start to let the timer catch up. - else intermissiondelay = 0; if (sysCallbacks.StartCutscene) sysCallbacks.StartCutscene(flags & SJ_BLOCKUI); } catch (...) diff --git a/src/common/cutscenes/screenjob.h b/src/common/cutscenes/screenjob.h index eaf6a10a9..92cb766e8 100644 --- a/src/common/cutscenes/screenjob.h +++ b/src/common/cutscenes/screenjob.h @@ -17,7 +17,6 @@ void Job_Init(); enum { SJ_BLOCKUI = 1, - SJ_DELAY = 2, }; struct CutsceneDef @@ -51,7 +50,6 @@ DObject* CreateRunner(bool clearbefore = true); void AddGenericVideo(DObject* runner, const FString& fn, int soundid, int fps); -extern int intermissiondelay; extern DObject* runner; extern PClass* runnerclass; extern PType* runnerclasstype; diff --git a/src/common/engine/gamestate.h b/src/common/engine/gamestate.h index edea03a69..5f674a33b 100644 --- a/src/common/engine/gamestate.h +++ b/src/common/engine/gamestate.h @@ -26,4 +26,3 @@ enum gamestate_t : int extern gamestate_t gamestate; -extern int intermissiondelay;