mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- make sure that after travelling has finished, no travelling thinkers are left in the list.
Since this list is excluded from regular thinker cleaning, anything that may survive through the end of G_FinishTravel will endlessly multiply and severely break the following savegames or just simply crash on broken pointers.
This commit is contained in:
parent
9ca6764556
commit
465792df0a
2 changed files with 10 additions and 0 deletions
|
@ -77,6 +77,11 @@ public:
|
|||
static void RunThinkers (int statnum);
|
||||
static void DestroyAllThinkers ();
|
||||
static void DestroyMostThinkers ();
|
||||
static void DestroyThinkersInList(int statnum)
|
||||
{
|
||||
DestroyThinkersInList(Thinkers[STAT_TRAVELLING]);
|
||||
DestroyThinkersInList(FreshThinkers[STAT_TRAVELLING]);
|
||||
}
|
||||
static void SerializeAll (FArchive &arc, bool keepPlayers);
|
||||
static void MarkRoots();
|
||||
|
||||
|
|
|
@ -1295,6 +1295,11 @@ void G_FinishTravel ()
|
|||
}
|
||||
|
||||
bglobal.FinishTravel ();
|
||||
|
||||
// make sure that, after travelling has completed, no travelling thinkers are left.
|
||||
// Since this list is excluded from regular thinker cleaning, anything that may survive through here
|
||||
// will endlessly multiply and severely break the following savegames or just simply crash on broken pointers.
|
||||
DThinker::DestroyThinkersInList(STAT_TRAVELLING);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue