Fix bug with looping with atlases

This commit is contained in:
Ne_Eo
2024-08-28 12:06:47 +02:00
parent 166c5f4411
commit 3e5dc6f79f
+3 -4
View File
@@ -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)