Fix animation looping bugs. (#29457)

Summary of the problem is in the corresponding engine commit: a4ea5a4620

This commit requires engine master right now.

I think #29144 is probably the most severe one, but I touched Jittering and RotatingLight too since they seemed sus too.

Fixes #29144

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Pieter-Jan Briers
2024-07-04 10:02:43 +02:00
committed by GitHub
parent bc7907728c
commit 8d015f5c9f
3 changed files with 9 additions and 0 deletions

View File

@@ -48,6 +48,9 @@ namespace Content.Client.Jittering
if(args.Key != _jitterAnimationKey)
return;
if (!args.Finished)
return;
if (TryComp(uid, out AnimationPlayerComponent? animationPlayer)
&& TryComp(uid, out SpriteComponent? sprite))
_animationPlayer.Play(uid, animationPlayer, GetAnimation(jittering, sprite), _jitterAnimationKey);