diff --git a/src/p_mobj.c b/src/p_mobj.c index 2c3efefd2..255c3624b 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10847,7 +10847,9 @@ static boolean P_SpawnNonMobjMapThing(mapthing_t *mthing) #if MAXPLAYERS > 32 You should think about modifying the deathmatch starts to take full advantage of this! #endif - if (mthing->type <= MAXPLAYERS) // Player starts + UINT8 maxplayers = 32; + + if (mthing->type <= maxplayers) // Player starts { // save spots for respawning in network games if (!metalrecording) @@ -10866,7 +10868,7 @@ static boolean P_SpawnNonMobjMapThing(mapthing_t *mthing) } else if (mthing->type == 34) // Red CTF starts { - if (numredctfstarts < MAXPLAYERS) + if (numredctfstarts < maxplayers) { redctfstarts[numredctfstarts] = mthing; mthing->type = 0; @@ -10876,7 +10878,7 @@ static boolean P_SpawnNonMobjMapThing(mapthing_t *mthing) } else if (mthing->type == 35) // Blue CTF starts { - if (numbluectfstarts < MAXPLAYERS) + if (numbluectfstarts < maxplayers) { bluectfstarts[numbluectfstarts] = mthing; mthing->type = 0;