Combat AI: allow only one summoned creature at time

pull/280/head
Andrei Kortunov 7 years ago
parent c52a579410
commit e799cbdb51

@ -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…
Cancel
Save