Skip to content

Commit

Permalink
[BUGFIX] Made freeplay use the metadata to get the instrumental suffix
Browse files Browse the repository at this point in the history
Song previews in freeplay will now use the instrumental suffix from the current difficulty's corresponding song variation metadata instead of using the variation id as an instrumental suffix and checking only the "erect" variation.
  • Loading branch information
AppleHair authored Jun 10, 2024
1 parent eb979a8 commit 9fa6033
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions source/funkin/ui/freeplay/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1890,14 +1890,17 @@ class FreeplayState extends MusicBeatSubState
}
else
{
var potentiallyErect:String = (currentDifficulty == "erect") || (currentDifficulty == "nightmare") ? "-erect" : "";
var previewSong:Null<Song> = SongRegistry.instance.fetchEntry(daSongCapsule.songData.songId);
var instSuffix:String = previewSong?.getDifficulty(currentDifficulty,
previewSong?.variations ?? Constants.DEFAULT_VARIATION_LIST)?.characters?.instrumental ?? '';
instSuffix = (instSuffix != '') ? '-$instSuffix' : '';
FunkinSound.playMusic(daSongCapsule.songData.songId,
{
startingVolume: 0.0,
overrideExisting: true,
restartTrack: false,
pathsFunction: INST,
suffix: potentiallyErect,
suffix: instSuffix,
partialParams:
{
loadPartial: true,
Expand Down

0 comments on commit 9fa6033

Please sign in to comment.