forked from mirror/openmw-tes3mp
Make sure player doesn't get any AI packages (Bug #1749)
This commit is contained in:
parent
8707f7b116
commit
1fc424ce30
2 changed files with 5 additions and 0 deletions
|
@ -245,6 +245,9 @@ void AiSequence::clear()
|
||||||
|
|
||||||
void AiSequence::stack (const AiPackage& package, const MWWorld::Ptr& actor)
|
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)
|
if (package.getTypeId() == AiPackage::TypeIdCombat || package.getTypeId() == AiPackage::TypeIdPursue)
|
||||||
{
|
{
|
||||||
// Notify AiWander of our current position so we can return to it after combat finished
|
// 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);
|
mPlayer.load (player.mObject);
|
||||||
|
|
||||||
|
getPlayer().getClass().getCreatureStats(getPlayer()).getAiSequence().clear();
|
||||||
|
|
||||||
MWBase::World& world = *MWBase::Environment::get().getWorld();
|
MWBase::World& world = *MWBase::Environment::get().getWorld();
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in a new issue