From f36e5ef403a79aec2a751001ba4ec8aeb1285e9c Mon Sep 17 00:00:00 2001 From: Allofich Date: Wed, 31 Aug 2016 21:03:41 +0900 Subject: [PATCH] Use last effect of spell for hand effect color --- apps/openmw/mwmechanics/character.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 93f553f19..782e59696 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -1236,10 +1236,10 @@ bool CharacterController::updateWeaponState() cast.playSpellCastingEffects(spellid); const ESM::Spell *spell = store.get().find(spellid); - const ESM::ENAMstruct &effectentry = spell->mEffects.mList.at(0); + const ESM::ENAMstruct &lasteffect = spell->mEffects.mList.at(spell->mEffects.mList.size() - 1); const ESM::MagicEffect *effect; - effect = store.get().find(effectentry.mEffectID); + effect = store.get().find(lasteffect.mEffectID); const ESM::Static* castStatic = MWBase::Environment::get().getWorld()->getStore().get().find ("VFX_Hands"); if (mAnimation->getNode("Bip01 L Hand")) @@ -1248,7 +1248,7 @@ bool CharacterController::updateWeaponState() if (mAnimation->getNode("Bip01 R Hand")) mAnimation->addEffect("meshes\\" + castStatic->mModel, -1, false, "Bip01 R Hand", effect->mParticle); - switch(effectentry.mRange) + switch(lasteffect.mRange) { case 0: mAttackType = "self"; break; case 1: mAttackType = "touch"; break;