]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Flesh Stun Fix (#39324)
authorPrincess Cheeseballs <66055347+Princess-Cheeseballs@users.noreply.github.com>
Fri, 1 Aug 2025 21:44:55 +0000 (14:44 -0700)
committerGitHub <noreply@github.com>
Fri, 1 Aug 2025 21:44:55 +0000 (00:44 +0300)
Content.Client/Damage/Systems/StaminaSystem.cs
Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
Resources/Prototypes/Entities/Mobs/NPCs/flesh.yml
Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml

index 046c72a8fa2e4a43801fb59fc715d225439215c4..67abb776740722ddbd08ac1a33bc3f22616116da 100644 (file)
@@ -4,6 +4,7 @@ using Content.Shared.Damage.Systems;
 using Content.Shared.Mobs;
 using Content.Shared.Mobs.Systems;
 using Robust.Client.GameObjects;
+using Robust.Shared.Utility;
 
 namespace Content.Client.Damage.Systems;
 
@@ -104,6 +105,8 @@ public sealed partial class StaminaSystem : SharedStaminaSystem
 
     private void PlayAnimation(Entity<StaminaComponent, SpriteComponent> entity)
     {
+        DebugTools.Assert(entity.Comp1.CritThreshold > entity.Comp1.AnimationThreshold, $"Animation threshold on {ToPrettyString(entity)} was not less than the crit threshold. This will cause errors, animation has been cancelled.");
+
         var step = Math.Clamp((entity.Comp1.StaminaDamage - entity.Comp1.AnimationThreshold) /
                               (entity.Comp1.CritThreshold - entity.Comp1.AnimationThreshold),
             0f,
index 6ecac1b922342ef33d312329f4f60e328cbec23c..dcf40dfcde50547f8be429153631d6d6ea61232d 100644 (file)
       10: Dead
   - type: Stamina
     critThreshold: 10
+    animationThreshold: 1
   - type: DamageStateVisuals
     states:
       Alive:
     factions:
     - Syndicate
   - type: Access
-    tags: 
+    tags:
     - NuclearOperative
     - SyndicateAgent
   - type: MeleeWeapon
index a1bcd547a6478b593c6b69b4e4466e9383323b56..f3ec5ff80b3dc83a856fe1e4b26587c9d3037f1c 100644 (file)
@@ -42,6 +42,7 @@
       75: Dead
   - type: Stamina
     critThreshold: 50
+    animationThreshold: 25
   - type: Butcherable
     spawned:
     - id: FoodMeat
       75: Dead
   - type: Stamina
     critThreshold: 50
+    animationThreshold: 25
   - type: Butcherable
     spawned:
     - id: FoodMeat
       30: Dead
   - type: MovementSpeedModifier
     baseWalkSpeed: 2
-    baseSprintSpeed: 2.5
\ No newline at end of file
+    baseSprintSpeed: 2.5
index 2eaf7c819f1d3b556c4dc28f9afa438696146f03..be7c034a39ea0f7f7afa78e96a876aee0f569463 100644 (file)
@@ -53,6 +53,7 @@
         recursive: false
   - type: Stamina
     critThreshold: 15
+    animationThreshold: 5
   - type: MovementAlwaysTouching
   - type: DamageStateVisuals
     states: