From ad253059b1fa53e70b3d6c045f002ada9adce569 Mon Sep 17 00:00:00 2001 From: MiroslavR Date: Sun, 12 Oct 2014 01:15:40 +0200 Subject: [PATCH] Hit indicator for absorb/damage health effect --- apps/openmw/mwmechanics/actors.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index 71f9edfde..9b66f7afb 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -585,6 +585,12 @@ namespace MWMechanics } } + bool receivedMagicDamage = false; + + if (creatureStats.getMagicEffects().get(ESM::MagicEffect::DamageHealth).getMagnitude() > 0.0f + || creatureStats.getMagicEffects().get(ESM::MagicEffect::AbsorbHealth).getMagnitude() > 0.0f) + receivedMagicDamage = true; + // Apply damage ticks int damageEffects[] = { ESM::MagicEffect::FireDamage, ESM::MagicEffect::ShockDamage, ESM::MagicEffect::FrostDamage, ESM::MagicEffect::Poison, @@ -592,7 +598,6 @@ namespace MWMechanics }; DynamicStat health = creatureStats.getHealth(); - bool receivedMagicDamage = false; for (unsigned int i=0; i