From 56a5eb4f8ad4b3836faab8af355b057b32f436b1 Mon Sep 17 00:00:00 2001 From: ItsLJcool Date: Sat, 31 Jan 2026 20:01:48 -0700 Subject: [PATCH] Re-implement onDraw functionality for FunkinSprite As FlxAnimate didn't have the functionality before, so we have to do the check in FunkinSprite ourselves, as it itself stop's calling the `super.draw();` when it is a `isAnimate` --- source/funkin/backend/FunkinSprite.hx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/funkin/backend/FunkinSprite.hx b/source/funkin/backend/FunkinSprite.hx index 97ad5a111..84e6dbbbf 100644 --- a/source/funkin/backend/FunkinSprite.hx +++ b/source/funkin/backend/FunkinSprite.hx @@ -173,6 +173,17 @@ class FunkinSprite extends FlxAnimate implements IBeatReceiver implements IOffse { } + public override function draw() { + // re-implementing the `onDraw` functionality from `FlxSprite` since `FlxAnimate` didn't have this, so we have to add it back in ourselves + if (this.isAnimate && this.__drawOverrided) { + this.__drawOverrided = false; + this.onDraw(this); + this.__drawOverrided = true; + return; + } + super.draw(); + } + // ANIMATE ATLAS DRAWING #if REGION