mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 13:40:45 +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:
parent
a0cf28671c
commit
fb00691324
1 changed files with 24 additions and 22 deletions
46
src/g_game.c
46
src/g_game.c
|
@ -2533,42 +2533,44 @@ 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)
|
||||
{
|
||||
// They're dead, Jim.
|
||||
//nextmapoverride = spstage_start;
|
||||
nextmapoverride = gamemap;
|
||||
countdown2 = TICRATE;
|
||||
skipstats = true;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
notgameover = false;
|
||||
if (!countdown2)
|
||||
{
|
||||
if (playeringame[i])
|
||||
players[i].score = 0;
|
||||
}
|
||||
// They're dead, Jim.
|
||||
//nextmapoverride = spstage_start;
|
||||
nextmapoverride = gamemap;
|
||||
countdown2 = TICRATE;
|
||||
skipstats = true;
|
||||
|
||||
//emeralds = 0;
|
||||
tokenbits = 0;
|
||||
tokenlist = 0;
|
||||
token = 0;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i])
|
||||
players[i].score = 0;
|
||||
}
|
||||
|
||||
//emeralds = 0;
|
||||
tokenbits = 0;
|
||||
tokenlist = 0;
|
||||
token = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cv_coopstarposts.value == 2)
|
||||
|
||||
if (notgameover && cv_coopstarposts.value == 2)
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue