mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-01 06:51:47 +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;
|
resetlevel = true;
|
||||||
else if (gametype == GT_COOP && (netgame || multiplayer))
|
else if (gametype == GT_COOP && (netgame || multiplayer))
|
||||||
{
|
{
|
||||||
if (cv_cooplives.value == 0)
|
boolean notgameover = true;
|
||||||
;
|
|
||||||
else if (player->lives <= 0) // consider game over first
|
if (cv_cooplives.value != 0 && player->lives <= 0) // consider game over first
|
||||||
{
|
{
|
||||||
INT32 deadtimercheck = INT32_MAX;
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
if (!playeringame[i])
|
if (!playeringame[i])
|
||||||
continue;
|
continue;
|
||||||
if (players[i].exiting || players[i].lives > 0)
|
if (players[i].exiting || players[i].lives > 0)
|
||||||
break;
|
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.
|
notgameover = false;
|
||||||
//nextmapoverride = spstage_start;
|
if (!countdown2)
|
||||||
nextmapoverride = gamemap;
|
|
||||||
countdown2 = TICRATE;
|
|
||||||
skipstats = true;
|
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
|
||||||
{
|
{
|
||||||
if (playeringame[i])
|
// They're dead, Jim.
|
||||||
players[i].score = 0;
|
//nextmapoverride = spstage_start;
|
||||||
}
|
nextmapoverride = gamemap;
|
||||||
|
countdown2 = TICRATE;
|
||||||
|
skipstats = true;
|
||||||
|
|
||||||
//emeralds = 0;
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
tokenbits = 0;
|
{
|
||||||
tokenlist = 0;
|
if (playeringame[i])
|
||||||
token = 0;
|
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++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue