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

deque
MiroslavR 10 years ago
parent ff74d54e98
commit b6abfb0145

@ -775,13 +775,14 @@ namespace MWClass
damage = scaleDamage(damage, attacker, ptr);
if(damage > 0.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")
MWBase::Environment::get().getWindowManager()->activateHitOverlay();
}
float health = getCreatureStats(ptr).getHealth().getCurrent() - damage;
setActorHealth(ptr, health, attacker);
}
else
{
MWMechanics::DynamicStat<float> fatigue(getCreatureStats(ptr).getFatigue());

Loading…
Cancel
Save