From 7599b26d309bba10a22adab0abd051674a31eb5a Mon Sep 17 00:00:00 2001 From: Jeffrey Haines Date: Sun, 27 Apr 2014 09:37:43 -0400 Subject: [PATCH] Fixed: creatures won't witness crimes and potential crash. --- apps/openmw/mwmechanics/mechanicsmanagerimp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index 2b1fdd365..03beed5a5 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -843,7 +843,8 @@ namespace MWMechanics // Find an actor who witnessed the crime for (std::vector::iterator it = neighbors.begin(); it != neighbors.end(); ++it) { - if (*it == ptr) continue; // not the player + if ( *it == ptr + && it->getClass().isNpc()) continue; // not the player and is an NPC // Was the crime seen? if ( ( MWBase::Environment::get().getWorld()->getLOS(ptr, *it) && awarenessCheck(ptr, *it) ) || @@ -859,7 +860,8 @@ namespace MWMechanics // Tell everyone, including yourself for (std::vector::iterator it1 = neighbors.begin(); it1 != neighbors.end(); ++it1) { - if (*it1 == ptr) continue; // not the player + if ( *it == ptr + && it->getClass().isNpc()) continue; // not the player and is an NPC // TODO: Add more messages if (type == OT_Theft)