From 82ac6c999ef0edd7d2123205252ac152b7d34a41 Mon Sep 17 00:00:00 2001 From: Edward Richardson Date: Sun, 26 Oct 2014 04:14:52 +1300 Subject: [PATCH] Destroy old player mobjs when starting new games --- src/g_level.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/g_level.cpp b/src/g_level.cpp index 525f673185..f21a1dfe5f 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -236,6 +236,18 @@ void G_NewInit () { int i; + // Destory all old player refrences that may still exist + TThinkerIterator it(STAT_TRAVELLING); + APlayerPawn *pawn, *next; + + next = it.Next(); + while ((pawn = next) != NULL) + { + next = it.Next(); + pawn->flags |= MF_NOSECTOR | MF_NOBLOCKMAP; + pawn->Destroy(); + } + G_ClearSnapshots (); ST_SetNeedRefresh(); netgame = false;