From e62651e3cfd85886bb01a691136b67fa368e6451 Mon Sep 17 00:00:00 2001 From: Ru5tK1ng Date: Sun, 3 Mar 2024 21:33:35 -0600 Subject: [PATCH] Fixed: A_LookEx did not account for the +LOOKALLAROUND flag. --- src/playsim/p_enemy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/playsim/p_enemy.cpp b/src/playsim/p_enemy.cpp index b2b2db78f..4823b522d 100644 --- a/src/playsim/p_enemy.cpp +++ b/src/playsim/p_enemy.cpp @@ -1271,7 +1271,7 @@ int P_IsVisible(AActor *lookee, AActor *other, INTBOOL allaround, FLookExParams { maxdist = params->maxDist; mindist = params->minDist; - fov = params->Fov; + fov = allaround ? 0 : params->Fov; // [RK] Account for LOOKALLAROUND flag. } else { @@ -2086,7 +2086,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LookEx) { // If we find a valid target here, the wandering logic should *not* // be activated! If would cause the seestate to be set twice. - if (P_LookForPlayers(self, true, ¶ms)) + if (P_LookForPlayers(self, (self->flags4 & MF4_LOOKALLAROUND), ¶ms)) // [RK] Passing true for allround should only occur if the flag is actually set. goto seeyou; }