From 5925a6a8c593151d7b7dc8040579f2841e44298c Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sun, 21 Jan 2024 11:54:40 -0500 Subject: [PATCH] Revert "- use correct isHostile checks for target considerations" This reverts commit f9a88f10ed890ed05bfd118e40538a974004b00e. --- src/playsim/p_enemy.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/playsim/p_enemy.cpp b/src/playsim/p_enemy.cpp index 58adfb737..6111a6019 100644 --- a/src/playsim/p_enemy.cpp +++ b/src/playsim/p_enemy.cpp @@ -1823,7 +1823,7 @@ int P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params) if (!(player->mo->flags & MF_SHOOTABLE)) continue; // not shootable (observer or dead) - if (!actor->IsHostile(player->mo)) + if (actor->IsFriend(player->mo)) continue; // same +MF_FRIENDLY, ignore if (player->cheats & CF_NOTARGET) @@ -1917,7 +1917,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look) targ = NULL; } - if (targ && targ->player && ((targ->player->cheats & CF_NOTARGET) || !self->IsHostile(targ))) + if (targ && targ->player && ((targ->player->cheats & CF_NOTARGET) || !(targ->flags & MF_FRIENDLY))) { return 0; } @@ -1931,7 +1931,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look) if (targ && (targ->flags & MF_SHOOTABLE)) { - if (!self->IsHostile (targ)) // be a little more precise! + if (self->IsFriend (targ)) // be a little more precise! { // If we find a valid target here, the wandering logic should *not* // be activated! It would cause the seestate to be set twice.