Commit 95eef4e8 authored by LoveEevee's avatar LoveEevee

Fix bgm_songsel playing on error

parent 8f736b5b
...@@ -177,13 +177,16 @@ class LoadSong{ ...@@ -177,13 +177,16 @@ class LoadSong{
if(title !== this.selectedSong.originalTitle){ if(title !== this.selectedSong.originalTitle){
title += " (" + this.selectedSong.originalTitle + ")" title += " (" + this.selectedSong.originalTitle + ")"
} }
this.clean() assets.sounds["v_start"].stop()
new SongSelect(false, false, this.touchEnabled, null, { setTimeout(() => {
name: "loadSongError", this.clean()
title: title, new SongSelect(false, false, this.touchEnabled, null, {
id: this.selectedSong.folder, name: "loadSongError",
error: error title: title,
}) id: this.selectedSong.folder,
error: error
})
}, 500)
} }
this.error = true this.error = true
} }
......
...@@ -278,7 +278,9 @@ class SongSelect{ ...@@ -278,7 +278,9 @@ class SongSelect{
}else if((!p2.session || fadeIn) && "selectedSong" in localStorage){ }else if((!p2.session || fadeIn) && "selectedSong" in localStorage){
this.selectedSong = Math.min(Math.max(0, localStorage["selectedSong"] |0), this.songs.length - 1) this.selectedSong = Math.min(Math.max(0, localStorage["selectedSong"] |0), this.songs.length - 1)
} }
this.playSound(songIdIndex !== -1 ? "v_diffsel" : "v_songsel") if(!this.showWarning){
this.playSound(songIdIndex !== -1 ? "v_diffsel" : "v_songsel")
}
snd.musicGain.fadeOut() snd.musicGain.fadeOut()
this.playBgm(false) this.playBgm(false)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment