0
0
Fork 0
mirror of https://git.do.srb2.org/STJr/SRB2.git synced 2025-03-01 15:00:59 +00:00

Fix a bug in a testing netgame where we were able to game over and yet ended up just resetting the map normally.

This commit is contained in:
toasterbabe 2017-07-08 11:41:20 +01:00
parent a0cf28671c
commit fb00691324

View file

@ -2533,22 +2533,22 @@ void G_DoReborn(INT32 playernum)
resetlevel = true;
else if (gametype == GT_COOP && (netgame || multiplayer))
{
if (cv_cooplives.value == 0)
;
else if (player->lives <= 0) // consider game over first
boolean notgameover = true;
if (cv_cooplives.value != 0 && player->lives <= 0) // consider game over first
{
INT32 deadtimercheck = INT32_MAX;
for (i = 0; i < MAXPLAYERS; i++)
{
if (!playeringame[i])
continue;
if (players[i].exiting || players[i].lives > 0)
break;
if (players[i].playerstate == PST_DEAD && players[i].deadtimer < deadtimercheck)
deadtimercheck = players[i].deadtimer;
}
if (!countdown2 && i == MAXPLAYERS && deadtimercheck >= 8*TICRATE)
if (i == MAXPLAYERS)
{
notgameover = false;
if (!countdown2)
{
// They're dead, Jim.
//nextmapoverride = spstage_start;
@ -2568,7 +2568,9 @@ void G_DoReborn(INT32 playernum)
token = 0;
}
}
if (cv_coopstarposts.value == 2)
}
if (notgameover && cv_coopstarposts.value == 2)
{
for (i = 0; i < MAXPLAYERS; i++)
{