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:
parent
ff74d54e98
commit
b6abfb0145
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue