1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-04-04 21:36:43 +00:00

disable AI combat for creatures

This commit is contained in:
gus 2013-10-28 23:04:46 +01:00
parent 5b20cce849
commit a6e7c6c104

View file

@ -74,6 +74,8 @@ void MWMechanics::AiSequence::execute (const MWWorld::Ptr& actor)
mCombatPackage->execute(actor); mCombatPackage->execute(actor);
} }
else else
{
if(actor.getTypeName() == typeid(ESM::NPC).name())
{ {
ESM::Position playerpos = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getRefData().getPosition(); ESM::Position playerpos = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getRefData().getPosition();
ESM::Position actorpos = actor.getRefData().getPosition(); ESM::Position actorpos = actor.getRefData().getPosition();
@ -98,6 +100,7 @@ void MWMechanics::AiSequence::execute (const MWWorld::Ptr& actor)
mCombat = true; mCombat = true;
mCombatPackage = new AiCombat("player"); mCombatPackage = new AiCombat("player");
} }
}
if (!mPackages.empty()) if (!mPackages.empty())
{ {
if (mPackages.front()->execute (actor)) if (mPackages.front()->execute (actor))