ref: 1f07cbb79638fa2822cbe577cd5e1010190c8950
parent: 07e9f3b987cc45c6e5ddd8197309f977d914f6a6
parent: 3235eb707ac0cf2a1977d80a67c00b9cd97a5336
author: Fabian Greffrath <[email protected]>
date: Thu Dec 20 07:00:04 EST 2018
Merge branch 'master' of https://github.com/chocolate-doom/chocolate-doom
--- a/src/heretic/doomdef.h
+++ b/src/heretic/doomdef.h
@@ -553,6 +553,7 @@
extern mapthing_t *deathmatch_p;
extern mapthing_t deathmatchstarts[10];
extern mapthing_t playerstarts[MAXPLAYERS];
+extern boolean playerstartsingame[MAXPLAYERS];
extern int mouseSensitivity;
--- a/src/heretic/p_mobj.c
+++ b/src/heretic/p_mobj.c
@@ -1052,6 +1052,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/heretic/p_setup.c
+++ b/src/heretic/p_setup.c
@@ -60,6 +60,7 @@
mapthing_t deathmatchstarts[10], *deathmatch_p;
mapthing_t playerstarts[MAXPLAYERS];
+boolean playerstartsingame[MAXPLAYERS];
/*
=================
@@ -277,6 +278,18 @@
spawnthing.type = SHORT(mt->type);
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);
+ }
+ playerstartsingame[i] = false;
+ }
}
W_ReleaseLumpNum(lump);