From b04a7708b17c5962718c2fceaf8cf7a2629fa79a Mon Sep 17 00:00:00 2001 From: ComedyLost <106041578+ComedyLost@users.noreply.github.com> Date: Sat, 27 Dec 2025 05:27:43 -0500 Subject: [PATCH] Clear Freeplay previews when switching selection Makes it harder to crash Freeplay when scrolling really fast --- source/funkin/ui/freeplay/FreeplayState.hx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/funkin/ui/freeplay/FreeplayState.hx b/source/funkin/ui/freeplay/FreeplayState.hx index 78e29a40e..a1c0512c0 100644 --- a/source/funkin/ui/freeplay/FreeplayState.hx +++ b/source/funkin/ui/freeplay/FreeplayState.hx @@ -2921,9 +2921,13 @@ class FreeplayState extends MusicBeatSubState // switchBackingImage(currentCapsule.freeplayData); } - // Small vibrations every selection change. - if (change != 0) HapticUtil.vibrate(0, 0.01, 0.5); - + // Clear song previews and add small vibrations every selection change. + if (change != 0) + { + clearPreviews(); + HapticUtil.vibrate(0, 0.01, 0.5); + } + dispatchEvent(new CapsuleScriptEvent(CAPSULE_SELECTED, currentCapsule, currentDifficulty, currentVariation)); }