1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-29 08:41:34 +00:00

Merge pull request #2988 from Capostrophic/pursue

AIPursue: don't do a LOS check
This commit is contained in:
Bret Curtis 2020-08-09 13:02:40 +02:00 committed by GitHub
commit a9cf82c7d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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