mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
P_SupermanLook4Players: Do not allow focusing on respawning players
This commit is contained in:
parent
0bf9ad85c1
commit
c202b603da
1 changed files with 18 additions and 11 deletions
29
src/p_mobj.c
29
src/p_mobj.c
|
|
@ -4661,22 +4661,29 @@ boolean P_BossTargetPlayer(mobj_t *actor, boolean closest)
|
|||
// Finds the player no matter what they're hiding behind (even lead!)
|
||||
boolean P_SupermanLook4Players(mobj_t *actor)
|
||||
{
|
||||
INT32 c, stop = 0;
|
||||
player_t *playersinthegame[MAXPLAYERS];
|
||||
UINT8 c, stop = 0;
|
||||
UINT8 playersinthegame[MAXPLAYERS];
|
||||
|
||||
for (c = 0; c < MAXPLAYERS; c++)
|
||||
{
|
||||
if (playeringame[c] && !players[c].spectator)
|
||||
{
|
||||
if (!players[c].mo)
|
||||
continue;
|
||||
// Playing status
|
||||
if (!playeringame[c])
|
||||
continue;
|
||||
if (players[c].spectator)
|
||||
continue;
|
||||
|
||||
if (players[c].mo->health <= 0)
|
||||
continue; // dead
|
||||
// Mobj status
|
||||
if (!players[c].mo)
|
||||
continue;
|
||||
if (players[c].mo->health <= 0)
|
||||
continue; // dead
|
||||
|
||||
playersinthegame[stop] = &players[c];
|
||||
stop++;
|
||||
}
|
||||
// Pain status
|
||||
if (players[c].respawn.state != RESPAWNST_NONE)
|
||||
continue; // don't wail on the respawning
|
||||
|
||||
playersinthegame[stop] = c;
|
||||
stop++;
|
||||
}
|
||||
|
||||
if (!stop)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue