mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 16:51:31 +00:00
Destroy old player mobjs when starting new games
This commit is contained in:
parent
1c500cead6
commit
82ac6c999e
1 changed files with 12 additions and 0 deletions
|
@ -236,6 +236,18 @@ void G_NewInit ()
|
|||
{
|
||||
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 ();
|
||||
ST_SetNeedRefresh();
|
||||
netgame = false;
|
||||
|
|
Loading…
Reference in a new issue