- Unfriendly players now spawn at deathmatch starts.

This commit is contained in:
Rachael Alexanderson 2017-03-14 04:02:40 -04:00
commit 959fb2577b
2 changed files with 19 additions and 1 deletions

View file

@ -4080,6 +4080,22 @@ void P_SetupLevel (const char *lumpname, int position)
}
}
// [SP] move unfriendly players around
// horribly hacky - yes, this needs rewritten.
for (i = 0; i < MAXPLAYERS; ++i)
{
if (playeringame[i] && players[i].mo != NULL)
{
if (!(players[i].mo->flags & MF_FRIENDLY))
{
AActor * oldSpawn = players[i].mo;
G_DeathMatchSpawnPlayer (i);
oldSpawn->Destroy();
}
}
}
// Don't count monsters in end-of-level sectors if option is on
if (dmflags2 & DF2_NOCOUNTENDMONST)
{