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:
toasterbabe 2017-06-03 22:14:20 +01:00
parent 8d8ae2b538
commit a872f1c68f
3 changed files with 11 additions and 7 deletions

View File

@ -2754,6 +2754,9 @@ void G_AddPlayer(INT32 playernum)
p->jointime = 0;
p->playerstate = PST_REBORN;
if (G_GametypeUsesLives())
p->lives = cv_startinglives.value;
if (countplayers && !notexiting)
P_DoPlayerExit(p);
}

View File

@ -9084,9 +9084,10 @@ void P_SpawnPlayer(INT32 playernum)
// spawn as spectator determination
if (!G_GametypeHasSpectators())
{
if ( ( (multiplayer || netgame) && gametype == GT_COOP && leveltime > 0) // only question status in 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
if (((multiplayer || netgame) && gametype == GT_COOP) // only question status in coop
&& ((leveltime > 0
&& ((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
p->spectator = true;
else
@ -9135,7 +9136,7 @@ void P_SpawnPlayer(INT32 playernum)
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
mobj = P_SpawnMobj(0, 0, 0, MT_PLAYER);

View File

@ -1983,7 +1983,7 @@ static void ST_overlayDrawer(void)
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."));
else if (gametype == GT_HIDEANDSEEK &&
(!stplyr->spectator && !(stplyr->pflags & PF_TAGIT)) && (leveltime > hidetime * TICRATE))
@ -2010,8 +2010,8 @@ static void ST_overlayDrawer(void)
if (G_GametypeHasTeams())
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_HUDTRANSHALF, M_GetText("Press Fire to be assigned to a team."));
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."));
else if (gametype == GT_COOP)
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_HUDTRANSHALF, M_GetText("You cannot play until the stage has ended."));
else if (gametype == GT_COOP && stplyr->lives <= 0)
{
if (cv_cooplives.value == 1
&& (netgame || multiplayer))