Fixed Random! song fade

This commit is contained in:
AwesomezPro99
2025-10-01 18:36:54 +07:00
committed by MoonDroid
parent e3a5f329ad
commit ca88b00d95
+5 -7
View File
@@ -2888,6 +2888,8 @@ class FreeplayState extends MusicBeatSubState
var previewVolume:Float = 0.7;
if (dj != null) previewVolume *= dj.getMusicPreviewMult();
clearPreviews();
if (curSelected == 0)
{
FunkinSound.playMusic('freeplayRandom',
@@ -2919,8 +2921,6 @@ class FreeplayState extends MusicBeatSubState
instSuffix = (instSuffix != '') ? '-$instSuffix' : '';
// trace('Attempting to play partial preview: ${previewSong.id}:${instSuffix}');
clearPreviews();
FunkinSound.playMusic(previewSong.id,
{
startingVolume: 0.0,
@@ -2940,13 +2940,11 @@ class FreeplayState extends MusicBeatSubState
var fadeStart:Float = (FlxG.sound.music.length / 1000) - 2;
previewTimers.push(new FlxTimer().start(fadeStart, function(_)
{
previewTimers.push(new FlxTimer().start(fadeStart, function(_) {
FlxG.sound.music.fadeOut(2, 0);
}));
previewTimers.push(new FlxTimer().start(FlxG.sound.music.length / 1000, function(_)
{
previewTimers.push(new FlxTimer().start(FlxG.sound.music.length / 1000, function(_) {
playCurSongPreview();
}));
},
@@ -3411,4 +3409,4 @@ typedef MoveData =
var ?y:Float;
var ?speed:Float;
var ?wait:Float;
}
}