1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 09:32:45 +00:00

Preload VFX of spells selected by AI actors

This commit is contained in:
scrawl 2017-02-15 01:01:53 +01:00
parent 57b585570a
commit c4a89065a2

View File

@ -426,6 +426,9 @@ namespace MWMechanics
MWWorld::InventoryStore& inv = actor.getClass().getInventoryStore(actor);
inv.setSelectedEnchantItem(inv.end());
}
const ESM::Spell* spell = MWBase::Environment::get().getWorld()->getStore().get<ESM::Spell>().find(mSpellId);
MWBase::Environment::get().getWorld()->preloadEffects(&spell->mEffects);
}
float ActionSpell::getCombatRange (bool& isRanged) const