From c7d4fd3cbaa5b2f0d57c64ea11ab9d6fd6bf8ede Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 9 Nov 2022 06:58:21 +1100 Subject: [PATCH] Fix damage colour persisting (#12469) Probably. Easiest way to repro is make spaceman go horizontal and most of the time the red colour persists when the rotation animation starts. --- Content.Client/Weapons/Melee/MeleeWeaponSystem.Effects.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Content.Client/Weapons/Melee/MeleeWeaponSystem.Effects.cs b/Content.Client/Weapons/Melee/MeleeWeaponSystem.Effects.cs index e6223598ea..d90cb171cd 100644 --- a/Content.Client/Weapons/Melee/MeleeWeaponSystem.Effects.cs +++ b/Content.Client/Weapons/Melee/MeleeWeaponSystem.Effects.cs @@ -22,6 +22,9 @@ public sealed partial class MeleeWeaponSystem private void OnEffectAnimation(EntityUid uid, DamageEffectComponent component, AnimationCompletedEvent args) { + if (args.Key != DamageAnimationKey) + return; + if (TryComp(uid, out var sprite)) { sprite.Color = component.Color;