mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:23:51 +00:00
Use particle texture for "hit" effects
This commit is contained in:
parent
fe3a033642
commit
502a758eff
2 changed files with 10 additions and 1 deletions
|
@ -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…
Reference in a new issue