- timer code fixes.

This commit is contained in:
Christoph Oelckers 2021-05-24 20:34:01 +02:00
parent 1a9755b719
commit d994369fd0
4 changed files with 3 additions and 6 deletions

View File

@ -797,7 +797,9 @@ DEFINE_ACTION_FUNCTION(_MoviePlayer, Create)
DEFINE_ACTION_FUNCTION(_MoviePlayer, Start) DEFINE_ACTION_FUNCTION(_MoviePlayer, Start)
{ {
PARAM_SELF_STRUCT_PROLOGUE(MoviePlayer); PARAM_SELF_STRUCT_PROLOGUE(MoviePlayer);
I_FreezeTime(true);
self->Start(); self->Start();
I_FreezeTime(false);
return 0; return 0;
} }

View File

@ -59,7 +59,6 @@ PClass* runnerclass;
PType* runnerclasstype; PType* runnerclasstype;
CompletionFunc completion; CompletionFunc completion;
static int ticks; static int ticks;
int intermissiondelay;
//============================================================================= //=============================================================================
// //
@ -287,6 +286,7 @@ bool ScreenJobValidate()
VMValue parm[] = { runner }; VMValue parm[] = { runner };
VMReturn ret(&res); VMReturn ret(&res);
VMCall(func, parm, 1, &ret, 1); VMCall(func, parm, 1, &ret, 1);
I_ResetFrameTime();
return res; return res;
} }
} }
@ -315,8 +315,6 @@ bool StartCutscene(CutsceneDef& cs, int flags, const CompletionFunc& completion_
runner = nullptr; runner = nullptr;
return false; 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); if (sysCallbacks.StartCutscene) sysCallbacks.StartCutscene(flags & SJ_BLOCKUI);
} }
catch (...) catch (...)

View File

@ -17,7 +17,6 @@ void Job_Init();
enum enum
{ {
SJ_BLOCKUI = 1, SJ_BLOCKUI = 1,
SJ_DELAY = 2,
}; };
struct CutsceneDef struct CutsceneDef
@ -51,7 +50,6 @@ DObject* CreateRunner(bool clearbefore = true);
void AddGenericVideo(DObject* runner, const FString& fn, int soundid, int fps); void AddGenericVideo(DObject* runner, const FString& fn, int soundid, int fps);
extern int intermissiondelay;
extern DObject* runner; extern DObject* runner;
extern PClass* runnerclass; extern PClass* runnerclass;
extern PType* runnerclasstype; extern PType* runnerclasstype;

View File

@ -26,4 +26,3 @@ enum gamestate_t : int
extern gamestate_t gamestate; extern gamestate_t gamestate;
extern int intermissiondelay;