From 420602e15402a56e857f0eff6b1c8bb0ec129664 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 20 Feb 2018 05:35:18 -0500 Subject: [PATCH] - check for deathmatch starts before forcing an unfriendly player to use them. --- src/p_setup.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 937f77fa8..4f2a64bde 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -4138,15 +4138,18 @@ 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 (level.deathmatchstarts.Size () > 0) { - if (playeringame[i] && players[i].mo != NULL) + for (i = 0; i < MAXPLAYERS; ++i) { - if (!(players[i].mo->flags & MF_FRIENDLY)) + if (playeringame[i] && players[i].mo != NULL) { - AActor * oldSpawn = players[i].mo; - G_DeathMatchSpawnPlayer (i); - oldSpawn->Destroy(); + if (!(players[i].mo->flags & MF_FRIENDLY)) + { + AActor * oldSpawn = players[i].mo; + G_DeathMatchSpawnPlayer (i); + oldSpawn->Destroy(); + } } } }