diff --git a/code/fgame/actor.cpp b/code/fgame/actor.cpp index 56ed6bc9..6fc47646 100644 --- a/code/fgame/actor.cpp +++ b/code/fgame/actor.cpp @@ -4512,12 +4512,8 @@ void Actor::UpdateAnim Com_Printf("ChangeAnim\n"); ChangeAnim(); } - Director.iPaused--; - if (!Director.iPaused) - { - Director.ExecuteRunning(); - } - Director.iPaused++; + Director.Unpause(); + Director.Pause(); if (m_csSayAnim != STRING_EMPTY) { @@ -5534,9 +5530,7 @@ void Actor::Think m_bNeedReload = false; mbBreakSpecialAttack = false; - Director.iPaused--; - if (!Director.iPaused) - Director.ExecuteRunning(); + Director.Unpause(); //gi.DPrintf("Actor::Think 5: entnum %d, classname: %s\n", entnum, G_GetEntity(0) ? G_GetEntity(0)->getClassname() : ""); } @@ -8234,13 +8228,9 @@ void Actor::IdleTurn SafePtr prevTurnEntity = m_pTurnEntity; - Director.iPaused--; - if (!Director.iPaused) - { - Director.ExecuteRunning(); - } + Director.Unpause(); Unregister(STRING_TURNDONE); - Director.iPaused++; + Director.Pause(); if (m_pTurnEntity == prevTurnEntity) diff --git a/code/fgame/g_main.cpp b/code/fgame/g_main.cpp index bed7fffa..887e022c 100644 --- a/code/fgame/g_main.cpp +++ b/code/fgame/g_main.cpp @@ -545,14 +545,8 @@ void G_RunFrame( int levelTime, int frameTime ) } } - Director.iPaused--; g_iInThinks++; - - if( !Director.iPaused ) - { - Director.ExecuteRunning(); - } - + Director.Unpause(); g_iInThinks--; // Process any pending events that got posted during the script code diff --git a/code/fgame/level.cpp b/code/fgame/level.cpp index 2f4e84aa..3ebf78e7 100644 --- a/code/fgame/level.cpp +++ b/code/fgame/level.cpp @@ -1218,9 +1218,7 @@ void Level::ServerSpawned(void) ent->entity->Unregister(STRING_SPAWN); } - if (Director.iPaused-- == 1) { - Director.ExecuteRunning(); - } + Director.Unpause(); Unregister(STRING_SPAWN); } diff --git a/code/fgame/scriptmaster.cpp b/code/fgame/scriptmaster.cpp index 9a75d96d..2f77eacf 100644 --- a/code/fgame/scriptmaster.cpp +++ b/code/fgame/scriptmaster.cpp @@ -1,6 +1,6 @@ /* =========================================================================== -Copyright (C) 2015 the OpenMoHAA team +Copyright (C) 2023 the OpenMoHAA team This file is part of OpenMoHAA source code. diff --git a/code/fgame/scriptmaster.h b/code/fgame/scriptmaster.h index dbc3d42c..414f7fde 100644 --- a/code/fgame/scriptmaster.h +++ b/code/fgame/scriptmaster.h @@ -1,6 +1,6 @@ /* =========================================================================== -Copyright (C) 2015 the OpenMoHAA team +Copyright (C) 2023 the OpenMoHAA team This file is part of OpenMoHAA source code.