diff --git a/CHANGELOG.md b/CHANGELOG.md index 8379b6bea..635512836 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ Bug #4458: AiWander console command handles idle chances incorrectly Bug #4459: NotCell dialogue condition doesn't support partial matches Bug #4461: "Open" spell from non-player caster isn't a crime + Bug #4464: OpenMW keeps AiState cached storages even after we cancel AI packages Bug #4469: Abot Silt Striders – Model turn 90 degrees on horizontal Bug #4471: Retrieve SDL window settings instead of using magic numbers Bug #4474: No fallback when getVampireHead fails diff --git a/apps/openmw/mwmechanics/aisequence.cpp b/apps/openmw/mwmechanics/aisequence.cpp index e3b7c63fc..86cc2bbdc 100644 --- a/apps/openmw/mwmechanics/aisequence.cpp +++ b/apps/openmw/mwmechanics/aisequence.cpp @@ -360,6 +360,14 @@ void AiSequence::stack (const AiPackage& package, const MWWorld::Ptr& actor, boo } mPackages.push_back (package.clone()); + + // Make sure that temporary storage is empty + if (cancelOther) + { + mAiState.moveIn(new AiCombatStorage()); + mAiState.moveIn(new AiFollowStorage()); + mAiState.moveIn(new AiWanderStorage()); + } } AiPackage* MWMechanics::AiSequence::getActivePackage()