mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-16 01:02:03 +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;
|
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;
|
||||||
|
|
Loading…
Reference in a new issue