From 3a04e1174372fd2b605b99220d127a6cc1291ecc Mon Sep 17 00:00:00 2001 From: katsy Date: Thu, 5 Jan 2023 14:11:54 -0600 Subject: [PATCH] allow targeting invulnerable bosses --- src/g_game.c | 1 - src/p_user.c | 12 ++---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index b4a127a73..cd29a08f8 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1453,7 +1453,6 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer) if ( P_MobjWasRemoved(ticcmd_ztargetfocus[forplayer]) || !ticcmd_ztargetfocus[forplayer]->health || - (ticcmd_ztargetfocus[forplayer]->flags2 & MF2_FRET) || (ticcmd_ztargetfocus[forplayer]->type == MT_EGGMOBILE3 && !ticcmd_ztargetfocus[forplayer]->movecount) // Sea Egg is moving around underground and shouldn't be tracked ) P_SetTarget(&ticcmd_ztargetfocus[forplayer], NULL); diff --git a/src/p_user.c b/src/p_user.c index 4ca4e6c8a..0ca49ded0 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -9059,10 +9059,6 @@ mobj_t *P_LookForFocusTarget(player_t *player, mobj_t *exclude, SINT8 direction, switch (mo->type) { - case MT_TNTBARREL: - if (lockonflags & LOCK_INTERESTS) - break; - /*FALLTHRU*/ case MT_PLAYER: // Don't chase other players! case MT_DETON: continue; // Don't be STUPID, Sonic! @@ -9083,17 +9079,13 @@ mobj_t *P_LookForFocusTarget(player_t *player, mobj_t *exclude, SINT8 direction, /*FALLTHRU*/ default: - if ((lockonflags & LOCK_BOSS) && ((mo->flags & (MF_BOSS|MF_SHOOTABLE)) == (MF_BOSS|MF_SHOOTABLE))) // allows if it has the flags desired XOR it has the invert aimable flag - { - if (mo->flags2 & MF2_FRET) - continue; + if ((lockonflags & LOCK_BOSS) && (mo->flags & MF_BOSS)) // always allow targeting bosses break; - } if ((lockonflags & LOCK_ENEMY) && (!((mo->flags & (MF_ENEMY|MF_SHOOTABLE)) == (MF_ENEMY|MF_SHOOTABLE)) != !(mo->flags2 & MF2_INVERTAIMABLE))) // allows if it has the flags desired XOR it has the invert aimable flag break; - if ((lockonflags & LOCK_INTERESTS) && (mo->flags & (MF_PUSHABLE|MF_MONITOR))) // allows if it has the flags desired XOR it has the invert aimable flag + if ((lockonflags & LOCK_INTERESTS) && (mo->flags & (MF_PUSHABLE|MF_MONITOR))) // allows if it has the flags desired break; continue; // not a valid object