This commit is contained in:
Fabian Greffrath 2018-12-20 12:00:04 +01:00
commit 1f07cbb796
3 changed files with 15 additions and 0 deletions

View file

@ -553,6 +553,7 @@ extern ticcmd_t *netcmds;
extern mapthing_t *deathmatch_p;
extern mapthing_t deathmatchstarts[10];
extern mapthing_t playerstarts[MAXPLAYERS];
extern boolean playerstartsingame[MAXPLAYERS];
extern int mouseSensitivity;

View file

@ -1052,6 +1052,7 @@ void P_SpawnMapThing(mapthing_t * mthing)
{
// save spots for respawning in network games
playerstarts[mthing->type - 1] = *mthing;
playerstartsingame[mthing->type - 1] = true;
if (!deathmatch)
{
P_SpawnPlayer(mthing);

View file

@ -60,6 +60,7 @@ byte *rejectmatrix; // for fast sight rejection
mapthing_t deathmatchstarts[10], *deathmatch_p;
mapthing_t playerstarts[MAXPLAYERS];
boolean playerstartsingame[MAXPLAYERS];
/*
=================
@ -279,6 +280,18 @@ void P_LoadThings(int lump)
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);
}