1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-27 00:40:21 +00:00

Merge branch 'constant_telekinesis' into 'master'

Remove redundant lookup

See merge request OpenMW/openmw!2843
This commit is contained in:
psi29a 2023-03-19 12:30:03 +00:00
commit 3dc0e71b58

View File

@ -133,8 +133,7 @@ namespace MWClass
if (animation) if (animation)
{ {
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore(); const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
int index = ESM::MagicEffect::effectStringToId("sEffectTelekinesis"); const ESM::MagicEffect* effect = store.get<ESM::MagicEffect>().find(ESM::MagicEffect::Telekinesis);
const ESM::MagicEffect* effect = store.get<ESM::MagicEffect>().find(index);
animation->addSpellCastGlow( animation->addSpellCastGlow(
effect, 1); // 1 second glow to match the time taken for a door opening or closing effect, 1); // 1 second glow to match the time taken for a door opening or closing