From a0ca7c4b4321fe3c1894553ec0c675b9e839be72 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Sun, 9 Aug 2020 12:48:59 +0300 Subject: [PATCH] AIPursue: don't do a LOS check Properly resolve #4774 --- apps/openmw/mwmechanics/aipursue.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/openmw/mwmechanics/aipursue.cpp b/apps/openmw/mwmechanics/aipursue.cpp index 7aa2a95543..bfe860d6d9 100644 --- a/apps/openmw/mwmechanics/aipursue.cpp +++ b/apps/openmw/mwmechanics/aipursue.cpp @@ -39,8 +39,7 @@ bool AiPursue::execute (const MWWorld::Ptr& actor, CharacterController& characte if (target == MWWorld::Ptr() || !target.getRefData().getCount() || !target.getRefData().isEnabled()) return true; - if (!MWBase::Environment::get().getWorld()->getLOS(target, actor) - || !MWBase::Environment::get().getMechanicsManager()->awarenessCheck(target, actor)) + if (isTargetMagicallyHidden(target) && !MWBase::Environment::get().getMechanicsManager()->awarenessCheck(target, actor)) return false; if (target.getClass().getCreatureStats(target).isDead())