mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-06 16:31:47 +00:00
I'm starting to actually test this via netgame instead of just in splitscreen!
* Fixed oversight where late joiners may not actually get lives. * Fixed oversight where zero-livers could spawn in. * Reinstated flashing because a crawla walked onto one of the spawnpoints and we immediately got a game over. * Rejiggered the overlay drawer so the printing was consistent between normal spectatorship and game overness.
This commit is contained in:
parent
8d8ae2b538
commit
a872f1c68f
3 changed files with 11 additions and 7 deletions
|
@ -2754,6 +2754,9 @@ void G_AddPlayer(INT32 playernum)
|
||||||
p->jointime = 0;
|
p->jointime = 0;
|
||||||
p->playerstate = PST_REBORN;
|
p->playerstate = PST_REBORN;
|
||||||
|
|
||||||
|
if (G_GametypeUsesLives())
|
||||||
|
p->lives = cv_startinglives.value;
|
||||||
|
|
||||||
if (countplayers && !notexiting)
|
if (countplayers && !notexiting)
|
||||||
P_DoPlayerExit(p);
|
P_DoPlayerExit(p);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9084,9 +9084,10 @@ void P_SpawnPlayer(INT32 playernum)
|
||||||
// spawn as spectator determination
|
// spawn as spectator determination
|
||||||
if (!G_GametypeHasSpectators())
|
if (!G_GametypeHasSpectators())
|
||||||
{
|
{
|
||||||
if ( ( (multiplayer || netgame) && gametype == GT_COOP && leveltime > 0) // only question status in coop
|
if (((multiplayer || netgame) && gametype == GT_COOP) // only question status in coop
|
||||||
&& ( (G_IsSpecialStage(gamemap) && useNightsSS) // late join special stage
|
&& ((leveltime > 0
|
||||||
|| (cv_coopstarposts.value == 2 && (p->jointime < 1 || p->spectator) ) // late join or die in new coop
|
&& ((G_IsSpecialStage(gamemap) && useNightsSS) // late join special stage
|
||||||
|
|| (cv_coopstarposts.value == 2 && (p->jointime < 1 || p->spectator)))) // late join or die in new coop
|
||||||
|| ((!cv_cooplives.value || !P_GetLives(p)) && p->lives <= 0))) // game over and can't redistribute lives
|
|| ((!cv_cooplives.value || !P_GetLives(p)) && p->lives <= 0))) // game over and can't redistribute lives
|
||||||
p->spectator = true;
|
p->spectator = true;
|
||||||
else
|
else
|
||||||
|
@ -9135,7 +9136,7 @@ void P_SpawnPlayer(INT32 playernum)
|
||||||
p->skincolor = skincolor_blueteam;
|
p->skincolor = skincolor_blueteam;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((netgame || multiplayer) && !p->spectator && (gametype != GT_COOP || ((p->jointime < 1) && !(G_IsSpecialStage(gamemap) && useNightsSS))))
|
if ((netgame || multiplayer) && !p->spectator)
|
||||||
p->powers[pw_flashing] = flashingtics-1; // Babysitting deterrent
|
p->powers[pw_flashing] = flashingtics-1; // Babysitting deterrent
|
||||||
|
|
||||||
mobj = P_SpawnMobj(0, 0, 0, MT_PLAYER);
|
mobj = P_SpawnMobj(0, 0, 0, MT_PLAYER);
|
||||||
|
|
|
@ -1983,7 +1983,7 @@ static void ST_overlayDrawer(void)
|
||||||
|
|
||||||
if (!hu_showscores && (netgame || multiplayer) && displayplayer == consoleplayer)
|
if (!hu_showscores && (netgame || multiplayer) && displayplayer == consoleplayer)
|
||||||
{
|
{
|
||||||
if (!splitscreen && G_GametypeUsesLives() && stplyr->lives <= 0 && countdown != 1)
|
if (!splitscreen && gametype != GT_COOP && G_GametypeUsesLives() && stplyr->lives <= 0 && countdown != 1)
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 132, 0, M_GetText("Press F12 to watch another player."));
|
V_DrawCenteredString(BASEVIDWIDTH/2, 132, 0, M_GetText("Press F12 to watch another player."));
|
||||||
else if (gametype == GT_HIDEANDSEEK &&
|
else if (gametype == GT_HIDEANDSEEK &&
|
||||||
(!stplyr->spectator && !(stplyr->pflags & PF_TAGIT)) && (leveltime > hidetime * TICRATE))
|
(!stplyr->spectator && !(stplyr->pflags & PF_TAGIT)) && (leveltime > hidetime * TICRATE))
|
||||||
|
@ -2010,8 +2010,8 @@ static void ST_overlayDrawer(void)
|
||||||
if (G_GametypeHasTeams())
|
if (G_GametypeHasTeams())
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_HUDTRANSHALF, M_GetText("Press Fire to be assigned to a team."));
|
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_HUDTRANSHALF, M_GetText("Press Fire to be assigned to a team."));
|
||||||
else if (G_IsSpecialStage(gamemap) && useNightsSS)
|
else if (G_IsSpecialStage(gamemap) && useNightsSS)
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_HUDTRANSHALF, M_GetText("You cannot join the game until the stage has ended."));
|
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_HUDTRANSHALF, M_GetText("You cannot play until the stage has ended."));
|
||||||
else if (gametype == GT_COOP)
|
else if (gametype == GT_COOP && stplyr->lives <= 0)
|
||||||
{
|
{
|
||||||
if (cv_cooplives.value == 1
|
if (cv_cooplives.value == 1
|
||||||
&& (netgame || multiplayer))
|
&& (netgame || multiplayer))
|
||||||
|
|
Loading…
Reference in a new issue