Clean temporary storage if we assign new AI package (bug #4464)

pull/1781/head
Andrei Kortunov 6 years ago
parent ee45f54b53
commit ec73011617

@ -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

@ -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()

Loading…
Cancel
Save