mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +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!)
|
// Finds the player no matter what they're hiding behind (even lead!)
|
||||||
boolean P_SupermanLook4Players(mobj_t *actor)
|
boolean P_SupermanLook4Players(mobj_t *actor)
|
||||||
{
|
{
|
||||||
INT32 c, stop = 0;
|
UINT8 c, stop = 0;
|
||||||
player_t *playersinthegame[MAXPLAYERS];
|
UINT8 playersinthegame[MAXPLAYERS];
|
||||||
|
|
||||||
for (c = 0; c < MAXPLAYERS; c++)
|
for (c = 0; c < MAXPLAYERS; c++)
|
||||||
{
|
{
|
||||||
if (playeringame[c] && !players[c].spectator)
|
// Playing status
|
||||||
{
|
if (!playeringame[c])
|
||||||
if (!players[c].mo)
|
continue;
|
||||||
continue;
|
if (players[c].spectator)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (players[c].mo->health <= 0)
|
// Mobj status
|
||||||
continue; // dead
|
if (!players[c].mo)
|
||||||
|
continue;
|
||||||
|
if (players[c].mo->health <= 0)
|
||||||
|
continue; // dead
|
||||||
|
|
||||||
playersinthegame[stop] = &players[c];
|
// Pain status
|
||||||
stop++;
|
if (players[c].respawn.state != RESPAWNST_NONE)
|
||||||
}
|
continue; // don't wail on the respawning
|
||||||
|
|
||||||
|
playersinthegame[stop] = c;
|
||||||
|
stop++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stop)
|
if (!stop)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue