1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:23:51 +00:00

Do not display hit fader if the player wasn't damaged

This commit is contained in:
MiroslavR 2014-10-06 18:31:02 +02:00
parent ff74d54e98
commit b6abfb0145

View file

@ -775,12 +775,13 @@ namespace MWClass
damage = scaleDamage(damage, attacker, ptr); damage = scaleDamage(damage, attacker, ptr);
if(damage > 0.0f) if(damage > 0.0f)
{
sndMgr->playSound3D(ptr, "Health Damage", 1.0f, 1.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; float health = getCreatureStats(ptr).getHealth().getCurrent() - damage;
setActorHealth(ptr, health, attacker); setActorHealth(ptr, health, attacker);
if (ptr.getRefData().getHandle() == "player")
MWBase::Environment::get().getWindowManager()->activateHitOverlay();
} }
else else
{ {