From a46c4de918853f6d539815c2341a5d0ffd4fd675 Mon Sep 17 00:00:00 2001 From: Allofich Date: Thu, 12 Jan 2017 00:32:36 +0900 Subject: [PATCH] Stop combat when adding an AI package to an actor (Fixes #3722) --- apps/openmw/mwmechanics/aisequence.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/openmw/mwmechanics/aisequence.cpp b/apps/openmw/mwmechanics/aisequence.cpp index a134fd44a..1bd2f98b3 100644 --- a/apps/openmw/mwmechanics/aisequence.cpp +++ b/apps/openmw/mwmechanics/aisequence.cpp @@ -281,6 +281,10 @@ void AiSequence::stack (const AiPackage& package, const MWWorld::Ptr& actor) } } + // Stop combat when a non-combat AI package is added + if (isActualAiPackage(package.getTypeId())) + stopCombat(); + // remove previous packages if required if (package.shouldCancelPreviousAi()) {