diff --git a/P3D/Resources/Sound/MusicManager.vb b/P3D/Resources/Sound/MusicManager.vb index 4338ad8fb..5a8454b65 100644 --- a/P3D/Resources/Sound/MusicManager.vb +++ b/P3D/Resources/Sound/MusicManager.vb @@ -321,6 +321,7 @@ Public Class MusicManager End Sub Public Shared Sub [Stop]() + Playlist.Clear() MusicManager.Play(NO_MUSIC, False, 0.0F) _isIntroStarted = False End Sub diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoMusic.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoMusic.vb index 6e3a1180b..28b65e99e 100644 --- a/P3D/World/ActionScript/V2/ScriptCommands/DoMusic.vb +++ b/P3D/World/ActionScript/V2/ScriptCommands/DoMusic.vb @@ -12,10 +12,20 @@ Select Case command.ToLower() Case "play" - MusicManager.Play(argument, True) + Dim LoopSong As Boolean = True + If argument.Split(",").Length > 1 Then + LoopSong = CBool(argument.GetSplit(1, ",")) + End If + MusicManager.Play(argument.GetSplit(0, ","), LoopSong, LoopSong) - If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then - Screen.Level.MusicLoop = argument + If LoopSong = True Then + If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then + Screen.Level.MusicLoop = argument + End If + Else + If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then + Screen.Level.MusicLoop = "silence" + End If End If Case "forceplay" MusicManager.ClearCurrentlyPlaying()