diff --git a/Content.Client/Damage/Systems/StaminaSystem.cs b/Content.Client/Damage/Systems/StaminaSystem.cs index 046c72a8fa..67abb77674 100644 --- a/Content.Client/Damage/Systems/StaminaSystem.cs +++ b/Content.Client/Damage/Systems/StaminaSystem.cs @@ -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 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, diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index 6ecac1b922..dcf40dfcde 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -113,6 +113,7 @@ 10: Dead - type: Stamina critThreshold: 10 + animationThreshold: 1 - type: DamageStateVisuals states: Alive: @@ -3143,7 +3144,7 @@ factions: - Syndicate - type: Access - tags: + tags: - NuclearOperative - SyndicateAgent - type: MeleeWeapon diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/flesh.yml b/Resources/Prototypes/Entities/Mobs/NPCs/flesh.yml index a1bcd547a6..f3ec5ff80b 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/flesh.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/flesh.yml @@ -42,6 +42,7 @@ 75: Dead - type: Stamina critThreshold: 50 + animationThreshold: 25 - type: Butcherable spawned: - id: FoodMeat @@ -240,6 +241,7 @@ 75: Dead - type: Stamina critThreshold: 50 + animationThreshold: 25 - type: Butcherable spawned: - id: FoodMeat @@ -359,4 +361,4 @@ 30: Dead - type: MovementSpeedModifier baseWalkSpeed: 2 - baseSprintSpeed: 2.5 \ No newline at end of file + baseSprintSpeed: 2.5 diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml b/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml index 2eaf7c819f..be7c034a39 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/spacetick.yml @@ -53,6 +53,7 @@ recursive: false - type: Stamina critThreshold: 15 + animationThreshold: 5 - type: MovementAlwaysTouching - type: DamageStateVisuals states: