diff --git a/src/d_main.cpp b/src/d_main.cpp index 7a36d0c86..8ebca4382 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -2709,6 +2709,7 @@ void D_DoomMain (void) // clean up game state ST_Clear(); D_ErrorCleanup (); + DThinker::DestroyThinkersInList(STAT_STATIC); P_FreeLevelData(); P_FreeExtraLevelData(); diff --git a/src/dthinker.cpp b/src/dthinker.cpp index da68d8388..fddc28317 100644 --- a/src/dthinker.cpp +++ b/src/dthinker.cpp @@ -422,7 +422,7 @@ void DThinker::DestroyAllThinkers () for (i = 0; i <= MAX_STATNUM; i++) { - if (i != STAT_TRAVELLING) + if (i != STAT_TRAVELLING && i != STAT_STATIC) { DestroyThinkersInList (Thinkers[i]); DestroyThinkersInList (FreshThinkers[i]); diff --git a/src/g_level.cpp b/src/g_level.cpp index b811c1215..01911f742 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -427,6 +427,7 @@ void G_InitNew (const char *mapname, bool bTitleLevel) UnlatchCVars (); G_VerifySkill(); UnlatchCVars (); + DThinker::DestroyThinkersInList(STAT_STATIC); if (paused) { diff --git a/src/p_actionfunctions.cpp b/src/p_actionfunctions.cpp index 8f916614b..16c8c3267 100644 --- a/src/p_actionfunctions.cpp +++ b/src/p_actionfunctions.cpp @@ -1124,7 +1124,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SeekerMissile) PARAM_INT_DEF(chance); PARAM_INT_DEF(distance); - if ((flags & SMF_LOOK) && (self->tracer == 0) && (pr_seekermissile()tracer == nullptr) && (pr_seekermissile()tracer = P_RoughMonsterSearch (self, distance, true); } diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 14540b8a6..dcf1bd512 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -4203,6 +4203,7 @@ void P_Init () static void P_Shutdown () { // [ZZ] delete global event handlers + DThinker::DestroyThinkersInList(STAT_STATIC); E_Shutdown(false); P_DeinitKeyMessages (); P_FreeLevelData (); diff --git a/src/statnums.h b/src/statnums.h index 7f691e232..dd868bbe1 100644 --- a/src/statnums.h +++ b/src/statnums.h @@ -45,6 +45,7 @@ enum STAT_AUTODECAL, // A decal that can be automatically deleted STAT_CORPSEPOINTER, // An entry in Hexen's corpse queue STAT_TRAVELLING, // An actor temporarily travelling to a new map + STAT_STATIC, // persistent across maps. // Thinkers that do think STAT_FIRST_THINKING=32, diff --git a/src/wi_stuff.cpp b/src/wi_stuff.cpp index faf7c6c20..40658f317 100644 --- a/src/wi_stuff.cpp +++ b/src/wi_stuff.cpp @@ -1091,8 +1091,6 @@ public: void WI_updateNoState () { - WI_updateAnimatedBack(); - if (acceleratestage) { cnt = 0; @@ -1141,8 +1139,6 @@ public: void WI_updateShowNextLoc () { - WI_updateAnimatedBack(); - if (!--cnt || acceleratestage) WI_initNoState(); else @@ -1240,8 +1236,6 @@ public: bool stillticking; bool autoskip = WI_autoSkip(); - WI_updateAnimatedBack(); - if ((acceleratestage || autoskip) && ng_state != 6) { acceleratestage = 0; @@ -1492,8 +1486,6 @@ public: bool stillticking; bool autoskip = WI_autoSkip(); - WI_updateAnimatedBack (); - if ((acceleratestage || autoskip) && ng_state != 10) { acceleratestage = 0; @@ -1787,8 +1779,6 @@ public: void WI_updateStats () { - WI_updateAnimatedBack (); - if (acceleratestage && sp_state != 10) { acceleratestage = 0; @@ -2166,6 +2156,7 @@ static FIntermissionScreen WI_Screen; void WI_Ticker() { + WI_Screen.WI_updateAnimatedBack(); WI_Screen.WI_Ticker(); } diff --git a/wadsrc/static/zscript/base.txt b/wadsrc/static/zscript/base.txt index 0aba717cb..d8fed2f28 100644 --- a/wadsrc/static/zscript/base.txt +++ b/wadsrc/static/zscript/base.txt @@ -353,6 +353,7 @@ class Thinker : Object native STAT_AUTODECAL, // A decal that can be automatically deleted STAT_CORPSEPOINTER, // An entry in Hexen's corpse queue STAT_TRAVELLING, // An actor temporarily travelling to a new map + STAT_STATIC, // Thinkers that do think STAT_FIRST_THINKING=32,