From f6bd20378669a3fef445ef3f0a3580e90a1e86df Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Tue, 10 Sep 2024 01:33:15 -0400 Subject: [PATCH] Fix an issue where base inst wouldn't be chosen properly on remixes --- source/funkin/ui/freeplay/FreeplayState.hx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/funkin/ui/freeplay/FreeplayState.hx b/source/funkin/ui/freeplay/FreeplayState.hx index 6e961c287..d3c72e924 100644 --- a/source/funkin/ui/freeplay/FreeplayState.hx +++ b/source/funkin/ui/freeplay/FreeplayState.hx @@ -1985,6 +1985,12 @@ class FreeplayState extends MusicBeatSubState return; } + if (targetInstId == null) + { + var baseInstrumentalId:String = targetSong?.getBaseInstrumentalId(targetDifficultyId, targetDifficulty.variation ?? Constants.DEFAULT_VARIATION) ?? ''; + targetInstId = baseInstrumentalId; + } + // Visual and audio effects. FunkinSound.playOnce(Paths.sound('confirmMenu')); if (dj != null) dj.confirm(); @@ -2409,6 +2415,7 @@ class DifficultySprite extends FlxSprite if (assetDiffIdParts.length == 0) break; assetDiffId = assetDiffIdParts.join('-'); } + trace('Found difficulty asset: freeplay/freeplay${assetDiffId}'); // Check for an XML to use an animation instead of an image. if (Assets.exists(Paths.file('images/freeplay/freeplay${assetDiffId}.xml')))