mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Don't lock on if something is literally intangible.
This commit is contained in:
parent
2a452ddcf5
commit
9504d078e4
1 changed files with 6 additions and 2 deletions
|
@ -8890,12 +8890,16 @@ mobj_t *P_LookForEnemies(player_t *player, boolean nonenemies, boolean bullet)
|
|||
continue;
|
||||
|
||||
mo = (mobj_t *)think;
|
||||
if (!((mo->flags & (MF_ENEMY|MF_BOSS|MF_MONITOR) && (mo->flags & MF_SHOOTABLE)) || (mo->flags & MF_SPRING)) == !(mo->flags2 & MF2_INVERTAIMABLE)) // allows if it has the flags desired XOR it has the invert aimable flag
|
||||
continue; // not a valid target
|
||||
|
||||
if (mo->flags & MF_NOCLIPTHING)
|
||||
continue;
|
||||
|
||||
if (mo->health <= 0) // dead
|
||||
continue;
|
||||
|
||||
if (!((mo->flags & (MF_ENEMY|MF_BOSS|MF_MONITOR) && (mo->flags & MF_SHOOTABLE)) || (mo->flags & MF_SPRING)) == !(mo->flags2 & MF2_INVERTAIMABLE)) // allows if it has the flags desired XOR it has the invert aimable flag
|
||||
continue; // not a valid target
|
||||
|
||||
if (mo == player->mo)
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in a new issue