- delete thinkers before starting to restore the savegame data to avoid interference of the old thinkers' Destroy() method with the newly loaded data.

Note that even with this change it is still not possible to unarchive any thinker pointers before the thinker list has been loaded as it would create broken lists.
This commit is contained in:
Christoph Oelckers 2016-06-01 11:43:56 +02:00
commit 26a15d0ccc
4 changed files with 10 additions and 5 deletions

View file

@ -519,6 +519,14 @@ void P_SerializeThinkers (FArchive &arc, bool hubLoad)
DThinker::SerializeAll (arc, hubLoad);
}
void P_DestroyThinkers(bool hubLoad)
{
if (hubLoad)
DThinker::DestroyMostThinkers();
else
DThinker::DestroyAllThinkers();
}
//==========================================================================
//
// ArchiveSounds