From cad41599cf7245d7ad596f708a216e7032b1a5b3 Mon Sep 17 00:00:00 2001 From: Allofich Date: Tue, 9 Aug 2016 02:03:13 +0900 Subject: [PATCH] Fix travis build error and warnings --- apps/openmw/mwclass/door.cpp | 7 +++---- apps/openmw/mwrender/animation.cpp | 7 +------ 2 files changed, 4 insertions(+), 10 deletions(-) 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;