mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-03 07:17: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,13 +775,14 @@ 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);
|
||||||
float health = getCreatureStats(ptr).getHealth().getCurrent() - damage;
|
|
||||||
setActorHealth(ptr, health, attacker);
|
|
||||||
|
|
||||||
if (ptr.getRefData().getHandle() == "player")
|
if (ptr.getRefData().getHandle() == "player")
|
||||||
MWBase::Environment::get().getWindowManager()->activateHitOverlay();
|
MWBase::Environment::get().getWindowManager()->activateHitOverlay();
|
||||||
}
|
}
|
||||||
|
float health = getCreatureStats(ptr).getHealth().getCurrent() - damage;
|
||||||
|
setActorHealth(ptr, health, attacker);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MWMechanics::DynamicStat<float> fatigue(getCreatureStats(ptr).getFatigue());
|
MWMechanics::DynamicStat<float> fatigue(getCreatureStats(ptr).getFatigue());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue