From a1cf76e89cdea678019f406b5be690a7d733de00 Mon Sep 17 00:00:00 2001 From: CheemsAndFriends Date: Thu, 7 Nov 2024 01:35:39 +0100 Subject: [PATCH] Fix easter egg idle and cartoon to play as intended --- source/funkin/ui/freeplay/FreeplayDJ.hx | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/source/funkin/ui/freeplay/FreeplayDJ.hx b/source/funkin/ui/freeplay/FreeplayDJ.hx index 13b0d853d..6851c20b4 100644 --- a/source/funkin/ui/freeplay/FreeplayDJ.hx +++ b/source/funkin/ui/freeplay/FreeplayDJ.hx @@ -100,18 +100,6 @@ class FreeplayDJ extends FlxAtlasSprite { playFlashAnimation(animPrefix, true, false, true); } - - if (getCurrentAnimation() == animPrefix && this.isLoopComplete()) - { - if (timeIdling >= IDLE_EGG_PERIOD && !seenIdleEasterEgg) - { - currentState = IdleEasterEgg; - } - else if (timeIdling >= IDLE_CARTOON_PERIOD) - { - currentState = Cartoon; - } - } timeIdling += elapsed; case NewUnlock: var animPrefix = playableCharData.getAnimationPrefix('newUnlock'); @@ -253,6 +241,15 @@ class FreeplayDJ extends FlxAtlasSprite else if (name == playableCharData.getAnimationPrefix('idle')) { // trace('Finished idle'); + + if (timeIdling >= IDLE_EGG_PERIOD && !seenIdleEasterEgg) + { + currentState = IdleEasterEgg; + } + else if (timeIdling >= IDLE_CARTOON_PERIOD) + { + currentState = Cartoon; + } } else if (name == playableCharData.getAnimationPrefix('confirm')) {