Use particle texture for "hit" effects

pull/59/head^2
Allofich 8 years ago
parent fe3a033642
commit 502a758eff

@ -541,12 +541,17 @@ namespace MWMechanics
else
castStatic = MWBase::Environment::get().getWorld()->getStore().get<ESM::Static>().find ("VFX_DefaultHit");
std::string texture = "";
if (!magicEffect->mParticle.empty() && !(magicEffect->mData.mFlags & ESM::MagicEffect::Harmful))
texture = magicEffect->mParticle;
// TODO: VFX are no longer active after saving/reloading the game
bool loop = (magicEffect->mData.mFlags & ESM::MagicEffect::ContinuousVfx) != 0;
// Note: in case of non actor, a free effect should be fine as well
MWRender::Animation* anim = MWBase::Environment::get().getWorld()->getAnimation(target);
if (anim)
anim->addEffect("meshes\\" + castStatic->mModel, magicEffect->mIndex, loop, "");
anim->addEffect("meshes\\" + castStatic->mModel, magicEffect->mIndex, loop, "", texture);
}
}
}

@ -3163,7 +3163,11 @@ namespace MWWorld
const ESM::MagicEffect* effect = getStore().get<ESM::MagicEffect>().find(effectIt->mEffectID);
if ((effectIt->mArea <= 0 && !ignore.isEmpty() && ignore.getClass().isActor()) || effectIt->mRange != rangeType)
<<<<<<< fe3a033642f21393bc267afa4edcc373c9d5f80b
continue; // Not right range type, or not area effect and hit an actor
=======
continue; // Not right range type
>>>>>>> Use particle texture for "hit" effects
// Spawn the explosion orb effect
const ESM::Static* areaStatic;

Loading…
Cancel
Save