ref: b9416dc6f9e569adcd067c9acd0b18e5d3240dd8
parent: cb49854d10054ecbc24f169015647eda7a997d1a
parent: 28e6533feb8aee27e51f88624827064ecefcfbd4
author: Mike Swanson <mikeonthecomputer@gmail.com>
date: Tue Oct 2 10:04:12 EDT 2018
Merge branch 'master' of gh:mfrancis95/chocolate-doom
--- a/src/doom/doomstat.h
+++ b/src/doom/doomstat.h
@@ -228,7 +228,7 @@
// Player spawn spots.
extern mapthing_t playerstarts[MAXPLAYERS];
-
+extern boolean playerstartsingame[MAXPLAYERS];
// Intermission stats.
// Parameters for world map / intermission.
extern wbstartstruct_t wminfo;
--- a/src/doom/p_mobj.c
+++ b/src/doom/p_mobj.c
@@ -788,6 +788,7 @@
{
// save spots for respawning in network games
playerstarts[mthing->type-1] = *mthing;
+ playerstartsingame[mthing->type-1] = true;
if (!deathmatch)
P_SpawnPlayer (mthing);
--- a/src/doom/p_setup.c
+++ b/src/doom/p_setup.c
@@ -107,6 +107,7 @@
mapthing_t deathmatchstarts[MAX_DEATHMATCH_STARTS];
mapthing_t* deathmatch_p;
mapthing_t playerstarts[MAXPLAYERS];
+boolean playerstartsingame[MAXPLAYERS];
@@ -387,6 +388,17 @@
spawnthing.options = SHORT(mt->options);
P_SpawnMapThing(&spawnthing);
+ }
+
+ if (!deathmatch)
+ {
+ for (i = 0; i < MAXPLAYERS; i++)
+ {
+ if (playeringame[i] && !playerstartsingame[i])
+ {
+ I_Error("P_LoadThings: Player %d start missing (vanilla crashes here)", i + 1);
+ }
+ }
}
W_ReleaseLumpNum(lump);