From bb2169dca42ce5339148093673fabaf396dff6a5 Mon Sep 17 00:00:00 2001 From: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> Date: Wed, 3 Dec 2025 22:55:04 +0100 Subject: [PATCH] Change stamina slowdown to use a percentage-based threshold (#41691) Change stamina to use a percentage based slowdown --- Content.Shared/Damage/Components/StaminaComponent.cs | 4 ++-- Content.Shared/Damage/Systems/SharedStaminaSystem.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Shared/Damage/Components/StaminaComponent.cs b/Content.Shared/Damage/Components/StaminaComponent.cs index b343b24403..9875d31349 100644 --- a/Content.Shared/Damage/Components/StaminaComponent.cs +++ b/Content.Shared/Damage/Components/StaminaComponent.cs @@ -85,10 +85,10 @@ public sealed partial class StaminaComponent : Component public SoundSpecifier ForceStandSuccessSound = new SoundPathSpecifier("/Audio/Effects/thudswoosh.ogg"); /// - /// Thresholds that determine an entity's slowdown as a function of stamina damage. + /// Thresholds that determine an entity's slowdown as a function of stamina damage, in percentages. /// [DataField] - public Dictionary StunModifierThresholds = new() { {0, 1f }, { 60, 0.7f }, { 80, 0.5f } }; + public Dictionary StunModifierThresholds = new() { {0, 1f }, { 0.6, 0.7f }, { 0.8, 0.5f } }; #region Animation Data diff --git a/Content.Shared/Damage/Systems/SharedStaminaSystem.cs b/Content.Shared/Damage/Systems/SharedStaminaSystem.cs index 5a168f04a0..045052d1fa 100644 --- a/Content.Shared/Damage/Systems/SharedStaminaSystem.cs +++ b/Content.Shared/Damage/Systems/SharedStaminaSystem.cs @@ -442,7 +442,7 @@ public abstract partial class SharedStaminaSystem : EntitySystem { var key = thres.Key.Float(); - if (ent.Comp.StaminaDamage >= key && key > closest && closest < ent.Comp.CritThreshold) + if ((ent.Comp.StaminaDamage / ent.Comp.CritThreshold) >= key && key > closest && closest < 1f) closest = thres.Key; } -- 2.52.0