- moved thinker storage into FLevelLocals.

This commit is contained in:
Christoph Oelckers 2019-01-30 19:09:21 +01:00
commit 64ac6dbc6e
10 changed files with 33 additions and 48 deletions

View file

@ -253,6 +253,7 @@ void FLevelLocals::ClearPortals()
void FLevelLocals::ClearLevelData()
{
Thinkers.DestroyAllThinkers();
ClearAllSubsectorLinks(); // can't be done as part of the polyobj deletion process.
total_monsters = total_items = total_secrets =
@ -349,8 +350,6 @@ void P_FreeLevelData ()
E_Shutdown(true);
R_FreePastViewers();
Thinkers.DestroyAllThinkers ();
level.ClearLevelData();
}
@ -574,7 +573,7 @@ void P_Init ()
static void P_Shutdown ()
{
Thinkers.DestroyThinkersInList(STAT_STATIC);
level.Thinkers.DestroyThinkersInList(STAT_STATIC);
P_FreeLevelData ();
// [ZZ] delete global event handlers
E_Shutdown(false);