diff --git a/apps/openmw/mwclass/door.cpp b/apps/openmw/mwclass/door.cpp index 255f38dd9..8ed6bdca8 100644 --- a/apps/openmw/mwclass/door.cpp +++ b/apps/openmw/mwclass/door.cpp @@ -120,10 +120,9 @@ namespace MWClass { MWRender::Animation* animation = MWBase::Environment::get().getWorld()->getAnimation(ptr); - const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore(); - const ESM::MagicEffect *effect; - int index = effect->effectStringToId("sEffectTelekinesis"); - effect = store.get().find(index); + const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore(); + int index = ESM::MagicEffect::effectStringToId("sEffectTelekinesis"); + const ESM::MagicEffect *effect = store.get().find(index); animation->addSpellCastGlow(effect); // TODO: Telekinesis glow should only be as long as the door animation } diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index d2f88250d..7ed521935 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -183,11 +183,6 @@ namespace return mDone; } - int getTexUnit() - { - return mTexUnit; - } - void setWatchedSpellGlow(osg::ref_ptr watched) { mWatchedSpellGlow = watched; @@ -1190,7 +1185,7 @@ namespace MWRender void Animation::addSpellCastGlow(const ESM::MagicEffect *effect){ - osg::Vec4f glowColor = {1,1,1,1}; + osg::Vec4f glowColor(1,1,1,1); glowColor.x() = effect->mData.mRed / 255.f; glowColor.y() = effect->mData.mGreen / 255.f; glowColor.z() = effect->mData.mBlue / 255.f;