From c2b692e124f0eb3079499d393cfc2a86bfa134ec Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 26 Apr 2014 17:21:53 -0400 Subject: [PATCH] getActorsFollowing/Fighting no longer returns dead actors --- apps/openmw/mwmechanics/actors.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index 804ec7a41e..d51b02a158 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -1029,7 +1029,7 @@ namespace MWMechanics const MWWorld::Class &cls = MWWorld::Class::get(iter->first); CreatureStats &stats = cls.getCreatureStats(iter->first); - if(stats.getAiSequence().getTypeId() == AiPackage::TypeIdFollow) + if(stats.getAiSequence().getTypeId() == AiPackage::TypeIdFollow && !stats.isDead()) { MWMechanics::AiFollow* package = static_cast(stats.getAiSequence().getActivePackage()); if(package->getFollowedActor() == actor.getCellRef().mRefID) @@ -1051,7 +1051,7 @@ namespace MWMechanics const MWWorld::Class &cls = MWWorld::Class::get(*iter); CreatureStats &stats = cls.getCreatureStats(*iter); - if(stats.getAiSequence().getTypeId() == AiPackage::TypeIdCombat) + if(stats.getAiSequence().getTypeId() == AiPackage::TypeIdCombat && !stats.isDead()) { MWMechanics::AiCombat* package = static_cast(stats.getAiSequence().getActivePackage()); if(package->getTargetId() == actor.getCellRef().mRefID)