- delete the FraggleScript thinker in G_NewInit.

If this isn't done it can later cause problems when being taken down by GC
This commit is contained in:
Christoph Oelckers 2020-09-28 23:08:48 +02:00
parent 92d630eb45
commit da4e791a3f

View file

@ -91,6 +91,8 @@
#include "i_time.h"
#include "p_maputl.h"
#include "s_music.h"
#include "fragglescript/t_script.h"
#include "texturemanager.h"
void STAT_StartNewGame(const char *lev);
@ -373,6 +375,8 @@ void G_NewInit ()
pawn->flags |= MF_NOSECTOR | MF_NOBLOCKMAP;
pawn->Destroy();
}
if (primaryLevel->FraggleScriptThinker) primaryLevel->FraggleScriptThinker->Destroy();
primaryLevel->FraggleScriptThinker = nullptr;
G_ClearSnapshots ();
netgame = false;