mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 05:53:50 +00:00
Merge pull request #1413 from akortunov/spellpriority
Combat AI: allow only one summoned creature at time
This commit is contained in:
commit
13ccc73457
1 changed files with 9 additions and 0 deletions
|
@ -496,6 +496,15 @@ namespace MWMechanics
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Allow only one summoned creature at time
|
||||||
|
if (isSummoningEffect(effect.mEffectID))
|
||||||
|
{
|
||||||
|
MWMechanics::CreatureStats& creatureStats = actor.getClass().getCreatureStats(actor);
|
||||||
|
|
||||||
|
if (!creatureStats.getSummonedCreatureMap().empty())
|
||||||
|
return 0.f;
|
||||||
|
}
|
||||||
|
|
||||||
const ESM::MagicEffect* magicEffect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(effect.mEffectID);
|
const ESM::MagicEffect* magicEffect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(effect.mEffectID);
|
||||||
|
|
||||||
// Underwater casting not possible
|
// Underwater casting not possible
|
||||||
|
|
Loading…
Reference in a new issue