mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 12:31:32 +00:00
Turn players IT if they join the game after the hide time in tag gametypes
Except in gametypes with hide time stasis, because they can't change team.
This commit is contained in:
parent
7439ab5296
commit
678935f26a
5 changed files with 9 additions and 9 deletions
|
@ -2775,7 +2775,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||
players[playernum].spectator = false;
|
||||
|
||||
//If joining after hidetime in normal tag, default to being IT.
|
||||
if (gametype == GT_TAG && (leveltime > (hidetime * TICRATE)))
|
||||
if (((gametyperules & (GTR_TAG|GTR_HIDEFROZEN)) == GTR_TAG) && (leveltime > (hidetime * TICRATE)))
|
||||
{
|
||||
NetPacket.packet.newteam = 1; //minor hack, causes the "is it" message to be printed later.
|
||||
players[playernum].pflags |= PF_TAGIT; //make the player IT.
|
||||
|
|
|
@ -3221,7 +3221,7 @@ UINT32 gametypedefaultrules[NUMGAMETYPES] =
|
|||
// Tag
|
||||
GTR_RINGSLINGER|GTR_FIRSTPERSON|GTR_TAG|GTR_SPECTATORS|GTR_POINTLIMIT|GTR_TIMELIMIT|GTR_OVERTIME|GTR_STARTCOUNTDOWN|GTR_BLINDFOLDED|GTR_DEATHMATCHSTARTS|GTR_SPAWNINVUL|GTR_RESPAWNDELAY,
|
||||
// Hide and Seek
|
||||
GTR_RINGSLINGER|GTR_FIRSTPERSON|GTR_TAG|GTR_SPECTATORS|GTR_POINTLIMIT|GTR_TIMELIMIT|GTR_OVERTIME|GTR_STARTCOUNTDOWN|GTR_BLINDFOLDED|GTR_DEATHMATCHSTARTS|GTR_SPAWNINVUL|GTR_RESPAWNDELAY,
|
||||
GTR_RINGSLINGER|GTR_FIRSTPERSON|GTR_TAG|GTR_SPECTATORS|GTR_POINTLIMIT|GTR_TIMELIMIT|GTR_OVERTIME|GTR_STARTCOUNTDOWN|GTR_HIDEFROZEN|GTR_BLINDFOLDED|GTR_DEATHMATCHSTARTS|GTR_SPAWNINVUL|GTR_RESPAWNDELAY,
|
||||
|
||||
// CTF
|
||||
GTR_RINGSLINGER|GTR_FIRSTPERSON|GTR_SPECTATORS|GTR_TEAMS|GTR_TEAMFLAGS|GTR_POINTLIMIT|GTR_TIMELIMIT|GTR_OVERTIME|GTR_POWERSTONES|GTR_DEATHMATCHSTARTS|GTR_SPAWNINVUL|GTR_RESPAWNDELAY|GTR_PITYSHIELD,
|
||||
|
|
|
@ -2285,7 +2285,7 @@ void P_CheckSurvivors(void)
|
|||
if (!taggers) //If there are no taggers, pick a survivor at random to be it.
|
||||
{
|
||||
// Exception for hide and seek. If a round has started and the IT player leaves, end the round.
|
||||
if (gametype == GT_HIDEANDSEEK && (leveltime >= (hidetime * TICRATE)))
|
||||
if ((gametyperules & GTR_HIDEFROZEN) && (leveltime >= (hidetime * TICRATE)))
|
||||
{
|
||||
CONS_Printf(M_GetText("The IT player has left the game.\n"));
|
||||
if (server)
|
||||
|
|
|
@ -392,7 +392,7 @@ void P_GiveFinishFlags(player_t *player)
|
|||
mobj_t* flag = P_SpawnMobjFromMobj(player->mo, xoffs, yoffs, 0, MT_FINISHFLAG);
|
||||
flag->angle = angle;
|
||||
angle += FixedAngle(120*FRACUNIT);
|
||||
|
||||
|
||||
P_SetTarget(&flag->target, player->mo);
|
||||
}
|
||||
}
|
||||
|
@ -3679,7 +3679,7 @@ static boolean PIT_CheckSolidsTeeter(mobj_t *thing)
|
|||
if (thing == teeterer)
|
||||
return true;
|
||||
|
||||
if (thing->player && cv_tailspickup.value && gametype != GT_HIDEANDSEEK)
|
||||
if (thing->player && cv_tailspickup.value && !(gametyperules & GTR_HIDEFROZEN))
|
||||
return true;
|
||||
|
||||
blockdist = teeterer->radius + thing->radius;
|
||||
|
@ -8034,7 +8034,7 @@ static void P_MovePlayer(player_t *player)
|
|||
if (player->pflags & PF_TAGIT)
|
||||
forcestasis = true;
|
||||
}
|
||||
else if (gametype == GT_HIDEANDSEEK)
|
||||
else if (gametyperules & GTR_HIDEFROZEN)
|
||||
{
|
||||
if (!(player->pflags & PF_TAGIT))
|
||||
{
|
||||
|
|
|
@ -1444,7 +1444,7 @@ static void ST_drawPowerupHUD(void)
|
|||
|
||||
if (stplyr->spectator || stplyr->playerstate != PST_LIVE)
|
||||
return;
|
||||
|
||||
|
||||
// ---------
|
||||
// Finish icon
|
||||
// ---------
|
||||
|
@ -2363,12 +2363,12 @@ static void ST_drawTextHUD(void)
|
|||
textHUDdraw(M_GetText("\x82""You are blindfolded!"))
|
||||
textHUDdraw(M_GetText("Waiting for players to hide..."))
|
||||
}
|
||||
else if (gametype == GT_HIDEANDSEEK)
|
||||
else if (gametyperules & GTR_HIDEFROZEN)
|
||||
textHUDdraw(M_GetText("Hide before time runs out!"))
|
||||
else
|
||||
textHUDdraw(M_GetText("Flee before you are hunted!"))
|
||||
}
|
||||
else if (gametype == GT_HIDEANDSEEK && !(stplyr->pflags & PF_TAGIT))
|
||||
else if ((gametyperules & GTR_HIDEFROZEN) && !(stplyr->pflags & PF_TAGIT))
|
||||
{
|
||||
if (!splitscreen && !donef12)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue