From a10bec064101d2d6a5f6a0aa96ad89b85a2634c8 Mon Sep 17 00:00:00 2001 From: EmoGarbage404 <98561806+EmoGarbage404@users.noreply.github.com> Date: Wed, 22 Jun 2022 22:42:55 -0400 Subject: [PATCH] Slow on damage fix (#9044) --- Content.Shared/Damage/Systems/SlowOnDamageSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Shared/Damage/Systems/SlowOnDamageSystem.cs b/Content.Shared/Damage/Systems/SlowOnDamageSystem.cs index 47475fadf9..0d6222b194 100644 --- a/Content.Shared/Damage/Systems/SlowOnDamageSystem.cs +++ b/Content.Shared/Damage/Systems/SlowOnDamageSystem.cs @@ -1,4 +1,4 @@ -using Content.Shared.Damage.Components; +using Content.Shared.Damage.Components; using Content.Shared.FixedPoint; using Content.Shared.Movement.EntitySystems; @@ -29,7 +29,7 @@ namespace Content.Shared.Damage var total = damage.TotalDamage; foreach (var thres in component.SpeedModifierThresholds) { - if (FixedPoint2.Dist(thres.Key, total) < FixedPoint2.Dist(closest, total)) + if (total >= thres.Key && thres.Key > closest) closest = thres.Key; }