mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-02 14:57:59 +03: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…
Add table
Add a link
Reference in a new issue