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.
This commit is contained in:
@@ -22,6 +22,9 @@ public sealed partial class MeleeWeaponSystem
|
|||||||
|
|
||||||
private void OnEffectAnimation(EntityUid uid, DamageEffectComponent component, AnimationCompletedEvent args)
|
private void OnEffectAnimation(EntityUid uid, DamageEffectComponent component, AnimationCompletedEvent args)
|
||||||
{
|
{
|
||||||
|
if (args.Key != DamageAnimationKey)
|
||||||
|
return;
|
||||||
|
|
||||||
if (TryComp<SpriteComponent>(uid, out var sprite))
|
if (TryComp<SpriteComponent>(uid, out var sprite))
|
||||||
{
|
{
|
||||||
sprite.Color = component.Color;
|
sprite.Color = component.Color;
|
||||||
|
|||||||
Reference in New Issue
Block a user