Destroy old player mobjs when starting new games

This commit is contained in:
Edward Richardson 2014-10-26 04:14:52 +13:00
parent 1c500cead6
commit 82ac6c999e

View file

@ -236,6 +236,18 @@ void G_NewInit ()
{ {
int i; int i;
// Destory all old player refrences that may still exist
TThinkerIterator<APlayerPawn> 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 (); G_ClearSnapshots ();
ST_SetNeedRefresh(); ST_SetNeedRefresh();
netgame = false; netgame = false;