From 3e5dc6f79faf3e24700891ce200b65d35c3908f3 Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Wed, 28 Aug 2024 12:06:47 +0200 Subject: [PATCH] Fix bug with looping with atlases --- source/funkin/backend/FunkinSprite.hx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/funkin/backend/FunkinSprite.hx b/source/funkin/backend/FunkinSprite.hx index 6a634e1a..0d59650d 100644 --- a/source/funkin/backend/FunkinSprite.hx +++ b/source/funkin/backend/FunkinSprite.hx @@ -94,16 +94,15 @@ class FunkinSprite extends FlxSkewedSprite implements IBeatReceiver implements I public override function update(elapsed:Float) { super.update(elapsed); + if (animateAtlas != null) + animateAtlas.update(elapsed); // hate how it looks like but hey at least its optimized and fast - Nex if (!debugMode && isAnimFinished()) { var name = getAnimName() + '-loop'; - if (animation.exists(name)) + if (hasAnimation(name)) playAnim(name, false, lastAnimContext); } - - if (animateAtlas != null) - animateAtlas.update(elapsed); } public function loadSprite(path:String, Unique:Bool = false, Key:String = null)