forked from mirror/openmw-tes3mp
Allow multiple spell hit sounds on single target
This commit is contained in:
parent
7859e378df
commit
b4577fe751
1 changed files with 8 additions and 14 deletions
|
@ -356,7 +356,6 @@ namespace MWMechanics
|
||||||
|
|
||||||
ESM::EffectList reflectedEffects;
|
ESM::EffectList reflectedEffects;
|
||||||
std::vector<ActiveSpells::ActiveEffect> appliedLastingEffects;
|
std::vector<ActiveSpells::ActiveEffect> appliedLastingEffects;
|
||||||
bool firstAppliedEffect = true;
|
|
||||||
bool anyHarmfulEffect = false;
|
bool anyHarmfulEffect = false;
|
||||||
|
|
||||||
// HACK: cache target's magic effects here, and add any applied effects to it. Use the cached effects for determining resistance.
|
// HACK: cache target's magic effects here, and add any applied effects to it. Use the cached effects for determining resistance.
|
||||||
|
@ -544,9 +543,6 @@ namespace MWMechanics
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target.getClass().isActor() || magicEffect->mData.mFlags & ESM::MagicEffect::NoDuration)
|
if (target.getClass().isActor() || magicEffect->mData.mFlags & ESM::MagicEffect::NoDuration)
|
||||||
{
|
|
||||||
// Play sound, only for the first effect
|
|
||||||
if (firstAppliedEffect)
|
|
||||||
{
|
{
|
||||||
static const std::string schools[] = {
|
static const std::string schools[] = {
|
||||||
"alteration", "conjuration", "destruction", "illusion", "mysticism", "restoration"
|
"alteration", "conjuration", "destruction", "illusion", "mysticism", "restoration"
|
||||||
|
@ -557,8 +553,6 @@ namespace MWMechanics
|
||||||
sndMgr->playSound3D(target, magicEffect->mHitSound, 1.0f, 1.0f);
|
sndMgr->playSound3D(target, magicEffect->mHitSound, 1.0f, 1.0f);
|
||||||
else
|
else
|
||||||
sndMgr->playSound3D(target, schools[magicEffect->mData.mSchool]+" hit", 1.0f, 1.0f);
|
sndMgr->playSound3D(target, schools[magicEffect->mData.mSchool]+" hit", 1.0f, 1.0f);
|
||||||
firstAppliedEffect = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add VFX
|
// Add VFX
|
||||||
const ESM::Static* castStatic;
|
const ESM::Static* castStatic;
|
||||||
|
|
Loading…
Reference in a new issue