From b99ca92fee0fe6bd76042a4f8e3824a1db3e6ffe Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 8 Jan 2014 17:18:13 +0100 Subject: [PATCH] Add missing line of sight check --- apps/openmw/mwmechanics/mechanicsmanagerimp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index 0058fac6fc..c5b5e6401a 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -762,7 +762,9 @@ namespace MWMechanics bool reported=false; for (Actors::PtrControllerMap::const_iterator it = mActors.begin(); it != mActors.end(); ++it) { - if (it->first != ptr && awarenessCheck(ptr, it->first)) + if (it->first != ptr && + MWBase::Environment::get().getWorld()->getLOS(ptr, it->first) && + awarenessCheck(ptr, it->first)) { // NPCs will always curse you when they notice you steal their items, even if they don't report the crime if (it->first == victim && type == OT_Theft)