From b6abfb0145cb76f664da794473811a00093d6d98 Mon Sep 17 00:00:00 2001 From: MiroslavR Date: Mon, 6 Oct 2014 18:31:02 +0200 Subject: [PATCH] Do not display hit fader if the player wasn't damaged --- apps/openmw/mwclass/npc.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index ec1b89642..3276f15e9 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -775,12 +775,13 @@ namespace MWClass damage = scaleDamage(damage, attacker, ptr); if(damage > 0.0f) + { sndMgr->playSound3D(ptr, "Health Damage", 1.0f, 1.0f); + if (ptr.getRefData().getHandle() == "player") + MWBase::Environment::get().getWindowManager()->activateHitOverlay(); + } float health = getCreatureStats(ptr).getHealth().getCurrent() - damage; setActorHealth(ptr, health, attacker); - - if (ptr.getRefData().getHandle() == "player") - MWBase::Environment::get().getWindowManager()->activateHitOverlay(); } else {