1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00

AIPursue: don't do a LOS check

Properly resolve #4774
This commit is contained in:
Capostrophic 2020-08-09 12:48:59 +03:00
parent f73aa9f27a
commit a0ca7c4b43

View File

@ -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())