From b8afe142069c05657031f139e10ee213aec4a38d Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Fri, 28 Jun 2019 16:03:18 +0300 Subject: [PATCH] Disallow paralyzed actors to greet the player (bug #5074) --- CHANGELOG.md | 1 + apps/openmw/mwmechanics/aiwander.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0263daff..989a49acc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -106,6 +106,7 @@ Bug #5060: Magic effect visuals stop when death animation begins instead of when it ends Bug #5063: Shape named "Tri Shadow" in creature mesh is visible if it isn't hidden Bug #5069: Blocking creatures' attacks doesn't degrade shields + Bug #5074: Paralyzed actors greet the player Bug #5075: Enchanting cast style can be changed if there's no object Feature #1774: Handle AvoidNode Feature #2229: Improve pathfinding AI diff --git a/apps/openmw/mwmechanics/aiwander.cpp b/apps/openmw/mwmechanics/aiwander.cpp index dc225ac23..d00bbeb5f 100644 --- a/apps/openmw/mwmechanics/aiwander.cpp +++ b/apps/openmw/mwmechanics/aiwander.cpp @@ -527,7 +527,8 @@ namespace MWMechanics if (greetingState == AiWanderStorage::Greet_None) { if ((playerPos - actorPos).length2() <= helloDistance*helloDistance && - !player.getClass().getCreatureStats(player).isDead() && MWBase::Environment::get().getWorld()->getLOS(player, actor) + !player.getClass().getCreatureStats(player).isDead() && !actor.getClass().getCreatureStats(actor).isParalyzed() + && MWBase::Environment::get().getWorld()->getLOS(player, actor) && MWBase::Environment::get().getMechanicsManager()->awarenessCheck(player, actor)) greetingTimer++;