- restored order of destruction of interpolations and thinkers, which got accidentally reversed.

This commit is contained in:
Christoph Oelckers 2019-02-04 16:27:57 +01:00
parent a0042fd653
commit 26acd564fb
2 changed files with 3 additions and 2 deletions

View file

@ -255,6 +255,7 @@ void FLevelLocals::ClearPortals()
void FLevelLocals::ClearLevelData() void FLevelLocals::ClearLevelData()
{ {
interpolator.ClearInterpolations(); // [RH] Nothing to interpolate on a fresh level.
Thinkers.DestroyAllThinkers(); Thinkers.DestroyAllThinkers();
ClearAllSubsectorLinks(); // can't be done as part of the polyobj deletion process. ClearAllSubsectorLinks(); // can't be done as part of the polyobj deletion process.
@ -290,10 +291,9 @@ void FLevelLocals::ClearLevelData()
} }
ClearPortals(); ClearPortals();
interpolator.ClearInterpolations(); // [RH] Nothing to interpolate on a fresh level.
tagManager.Clear(); tagManager.Clear();
ClearTIDHashes(); ClearTIDHashes();
Behaviors.UnloadModules(); if (SpotState) SpotState->Destroy();
SpotState = nullptr; SpotState = nullptr;
ACSThinker = nullptr; ACSThinker = nullptr;
FraggleScriptThinker = nullptr; FraggleScriptThinker = nullptr;

View file

@ -429,6 +429,7 @@ void DSectorPlaneInterpolation::OnDestroy()
{ {
attached[i]->DelRef(); attached[i]->DelRef();
} }
attached.Reset();
Super::OnDestroy(); Super::OnDestroy();
} }