More spectator tweaks

This commit is contained in:
Jaime Passos 2019-12-18 15:14:24 -03:00
parent d3d91726f5
commit 7768e2c7f9
2 changed files with 24 additions and 18 deletions

View File

@ -11249,8 +11249,12 @@ void P_SpawnPlayer(INT32 playernum)
else else
{ {
p->outofcoop = false; p->outofcoop = false;
p->spectator = false;
if (netgame && p->jointime < 1) if (netgame && p->jointime < 1)
p->spectator = true; {
// Averted by GTR_NOSPECTATORSPAWN.
p->spectator = (gametyperules & GTR_NOSPECTATORSPAWN) ? false : true;
}
else if (multiplayer && !netgame) else if (multiplayer && !netgame)
{ {
// If you're in a team game and you don't have a team assigned yet... // If you're in a team game and you don't have a team assigned yet...

View File

@ -2205,31 +2205,33 @@ static void ST_drawTextHUD(void)
textHUDdraw(M_GetText("\x82""Wait for the stage to end...")) textHUDdraw(M_GetText("\x82""Wait for the stage to end..."))
else if (G_PlatformGametype()) else if (G_PlatformGametype())
{ {
if (gametype == GT_COOP if (gametype == GT_COOP)
&& stplyr->lives <= 0
&& cv_cooplives.value == 2
&& (netgame || multiplayer))
{ {
INT32 i; if (stplyr->lives <= 0
for (i = 0; i < MAXPLAYERS; i++) && cv_cooplives.value == 2
&& (netgame || multiplayer))
{ {
if (!playeringame[i]) INT32 i;
continue; for (i = 0; i < MAXPLAYERS; i++)
{
if (!playeringame[i])
continue;
if (&players[i] == stplyr) if (&players[i] == stplyr)
continue; continue;
if (players[i].lives > 1) if (players[i].lives > 1)
break; break;
} }
if (i != MAXPLAYERS) if (i != MAXPLAYERS)
textHUDdraw(M_GetText("You'll steal a life on respawn...")) textHUDdraw(M_GetText("You'll steal a life on respawn..."))
else
textHUDdraw(M_GetText("Wait to respawn..."))
}
else else
textHUDdraw(M_GetText("Wait to respawn...")) textHUDdraw(M_GetText("Wait to respawn..."))
} }
else
textHUDdraw(M_GetText("Wait to respawn..."))
} }
else if (G_GametypeHasSpectators()) else if (G_GametypeHasSpectators())
textHUDdraw(M_GetText("\x82""FIRE:""\x80 Enter game")) textHUDdraw(M_GetText("\x82""FIRE:""\x80 Enter game"))