From 6aeae14fe17e272e5d7e9caa7817eabd74bef927 Mon Sep 17 00:00:00 2001 From: freeman2651 <104049107+freeman2651@users.noreply.github.com> Date: Tue, 3 May 2022 05:53:05 -0400 Subject: [PATCH] Health hud adjust (#7702) Co-authored-by: metalgearsloth --- Content.Server/MobState/States/NormalMobState.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Server/MobState/States/NormalMobState.cs b/Content.Server/MobState/States/NormalMobState.cs index 6e61e6e79a..8e24ec1966 100644 --- a/Content.Server/MobState/States/NormalMobState.cs +++ b/Content.Server/MobState/States/NormalMobState.cs @@ -26,11 +26,11 @@ namespace Content.Server.MobState.States short modifier = 0; - if (stateComponent.TryGetEarliestIncapacitatedState(threshold, out _, out var earliestThreshold)) + if (stateComponent.TryGetEarliestIncapacitatedState(threshold, out _, out var earliestThreshold) && damageable.TotalDamage > 0) { - modifier = (short) (damageable.TotalDamage / (earliestThreshold / 7f)); + modifier = (short) MathF.Max((float) (damageable.TotalDamage / (earliestThreshold / 6f)),1); + //if hurt at all we skip to the first hurt state with Max(), anything else will end up falling to 5 at maximum before crit } - EntitySystem.Get().ShowAlert(entity, AlertType.HumanHealth, modifier); } }