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:
parent
5b20cce849
commit
a6e7c6c104
1 changed files with 24 additions and 21 deletions
|
@ -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))
|
||||||
|
|
Loading…
Reference in a new issue