1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-25 14:46:43 +00:00

[BUGFIX] Made freeplay use the metadata to get the instrumental suffix

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.
This commit is contained in:
AppleHair 2024-06-10 19:42:27 +03:00 committed by GitHub
parent eb979a8625
commit 9fa603363c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,