Flesh Stun Fix (#39324)

This commit is contained in:
Princess Cheeseballs
2025-08-01 14:44:55 -07:00
committed by GitHub
parent 66f64bc952
commit 6ffec751ee
4 changed files with 9 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ using Content.Shared.Damage.Systems;
using Content.Shared.Mobs; using Content.Shared.Mobs;
using Content.Shared.Mobs.Systems; using Content.Shared.Mobs.Systems;
using Robust.Client.GameObjects; using Robust.Client.GameObjects;
using Robust.Shared.Utility;
namespace Content.Client.Damage.Systems; namespace Content.Client.Damage.Systems;
@@ -104,6 +105,8 @@ public sealed partial class StaminaSystem : SharedStaminaSystem
private void PlayAnimation(Entity<StaminaComponent, SpriteComponent> entity) 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) / var step = Math.Clamp((entity.Comp1.StaminaDamage - entity.Comp1.AnimationThreshold) /
(entity.Comp1.CritThreshold - entity.Comp1.AnimationThreshold), (entity.Comp1.CritThreshold - entity.Comp1.AnimationThreshold),
0f, 0f,

View File

@@ -113,6 +113,7 @@
10: Dead 10: Dead
- type: Stamina - type: Stamina
critThreshold: 10 critThreshold: 10
animationThreshold: 1
- type: DamageStateVisuals - type: DamageStateVisuals
states: states:
Alive: Alive:
@@ -3143,7 +3144,7 @@
factions: factions:
- Syndicate - Syndicate
- type: Access - type: Access
tags: tags:
- NuclearOperative - NuclearOperative
- SyndicateAgent - SyndicateAgent
- type: MeleeWeapon - type: MeleeWeapon

View File

@@ -42,6 +42,7 @@
75: Dead 75: Dead
- type: Stamina - type: Stamina
critThreshold: 50 critThreshold: 50
animationThreshold: 25
- type: Butcherable - type: Butcherable
spawned: spawned:
- id: FoodMeat - id: FoodMeat
@@ -240,6 +241,7 @@
75: Dead 75: Dead
- type: Stamina - type: Stamina
critThreshold: 50 critThreshold: 50
animationThreshold: 25
- type: Butcherable - type: Butcherable
spawned: spawned:
- id: FoodMeat - id: FoodMeat
@@ -359,4 +361,4 @@
30: Dead 30: Dead
- type: MovementSpeedModifier - type: MovementSpeedModifier
baseWalkSpeed: 2 baseWalkSpeed: 2
baseSprintSpeed: 2.5 baseSprintSpeed: 2.5

View File

@@ -53,6 +53,7 @@
recursive: false recursive: false
- type: Stamina - type: Stamina
critThreshold: 15 critThreshold: 15
animationThreshold: 5
- type: MovementAlwaysTouching - type: MovementAlwaysTouching
- type: DamageStateVisuals - type: DamageStateVisuals
states: states: