mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-05 15:55:45 +00:00
Make sure player doesn't get any AI packages (Bug #1749)
This commit is contained in:
parent
8707f7b116
commit
1fc424ce30
@ -245,6 +245,9 @@ void AiSequence::clear()
|
||||
|
||||
void AiSequence::stack (const AiPackage& package, const MWWorld::Ptr& actor)
|
||||
{
|
||||
if (actor == MWBase::Environment::get().getWorld()->getPlayerPtr())
|
||||
throw std::runtime_error("Can't add AI packages to player");
|
||||
|
||||
if (package.getTypeId() == AiPackage::TypeIdCombat || package.getTypeId() == AiPackage::TypeIdPursue)
|
||||
{
|
||||
// Notify AiWander of our current position so we can return to it after combat finished
|
||||
|
@ -244,6 +244,8 @@ namespace MWWorld
|
||||
|
||||
mPlayer.load (player.mObject);
|
||||
|
||||
getPlayer().getClass().getCreatureStats(getPlayer()).getAiSequence().clear();
|
||||
|
||||
MWBase::World& world = *MWBase::Environment::get().getWorld();
|
||||
|
||||
try
|
||||
|
Loading…
Reference in New Issue
Block a user