From 780a48cd1e7a27e28ddda3c37090a49366cc60c0 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 9 Sep 2014 00:43:12 +0200 Subject: [PATCH] Don't greet dead actors in AiWander --- apps/openmw/mwmechanics/aiwander.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/aiwander.cpp b/apps/openmw/mwmechanics/aiwander.cpp index 2f51b64677..eafbdd59c5 100644 --- a/apps/openmw/mwmechanics/aiwander.cpp +++ b/apps/openmw/mwmechanics/aiwander.cpp @@ -434,7 +434,8 @@ namespace MWMechanics if (mSaidGreeting == Greet_None) { - if ((playerDistSqr <= helloDistance*helloDistance) && MWBase::Environment::get().getWorld()->getLOS(player, actor) + if ((playerDistSqr <= helloDistance*helloDistance) && + !player.getClass().getCreatureStats(player).isDead() && MWBase::Environment::get().getWorld()->getLOS(player, actor) && MWBase::Environment::get().getMechanicsManager()->awarenessCheck(player, actor)) mGreetingTimer++;