diff --git a/src/p_mobj.c b/src/p_mobj.c index b3d362e0b..2fe6cff23 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -11168,9 +11168,16 @@ void P_SpawnMapThing(mapthing_t *mthing) // check for players specially if (mthing->type > 0 && mthing->type <= 32) { - // save spots for respawning in network games - if (!metalrecording) - playerstarts[mthing->type-1] = mthing; + if (mthing->type > MAXPLAYERS) // be wary of playerstarts size! playerstarts[MAXPLAYERS] + { + CONS_Alert(CONS_ERROR, "Excess player start detected %d This will crash vanilla clients!\n", mthing->type); + } + else + { + // save spots for respawning in network games + if (!metalrecording) + playerstarts[mthing->type-1] = mthing; + } return; }