mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-21 19:31:26 +00:00
Give flashing tics to disconnected players and prevent drowning
This commit is contained in:
parent
73d0549fa4
commit
d03c928baa
2 changed files with 9 additions and 2 deletions
|
@ -748,6 +748,9 @@ boolean P_LookForPlayers(mobj_t *actor, boolean allaround, boolean tracer, fixed
|
|||
if (player->bot)
|
||||
continue; // ignore bots
|
||||
|
||||
if (player->quittime)
|
||||
continue; // Ignore uncontrolled bodies
|
||||
|
||||
if (dist > 0
|
||||
&& P_AproxDistance(P_AproxDistance(player->mo->x - actor->x, player->mo->y - actor->y), player->mo->z - actor->z) > dist)
|
||||
continue; // Too far away
|
||||
|
|
|
@ -11921,6 +11921,10 @@ void P_PlayerThink(player_t *player)
|
|||
player->pflags &= ~PF_USEDOWN;
|
||||
}
|
||||
|
||||
// IF PLAYER NOT HERE THEN FLASH END IF
|
||||
if (player->quittime && player->powers[pw_flashing] < flashingtics - 1)
|
||||
player->powers[pw_flashing] = flashingtics - 1;
|
||||
|
||||
// Counters, time dependent power ups.
|
||||
// Time Bonus & Ring Bonus count settings
|
||||
|
||||
|
@ -11964,12 +11968,12 @@ void P_PlayerThink(player_t *player)
|
|||
else
|
||||
player->powers[pw_underwater] = 0;
|
||||
}
|
||||
else if (player->powers[pw_underwater] && !(maptol & TOL_NIGHTS) && !((netgame || multiplayer) && player->spectator)) // underwater timer
|
||||
else if (player->powers[pw_underwater] && !(maptol & TOL_NIGHTS) && !((netgame || multiplayer) && (player->spectator || player->quittime))) // underwater timer
|
||||
player->powers[pw_underwater]--;
|
||||
|
||||
if (player->powers[pw_spacetime] && (player->pflags & PF_GODMODE || (player->powers[pw_shield] & SH_PROTECTWATER)))
|
||||
player->powers[pw_spacetime] = 0;
|
||||
else if (player->powers[pw_spacetime] && !(maptol & TOL_NIGHTS) && !((netgame || multiplayer) && player->spectator)) // underwater timer
|
||||
else if (player->powers[pw_spacetime] && !(maptol & TOL_NIGHTS) && !((netgame || multiplayer) && (player->spectator || player->quittime))) // underwater timer
|
||||
player->powers[pw_spacetime]--;
|
||||
|
||||
if (player->powers[pw_gravityboots] && player->powers[pw_gravityboots] < UINT16_MAX)
|
||||
|
|
Loading…
Reference in a new issue