Fix wrong music played when surf or ride

This commit is contained in:
JappaWakka 2024-04-03 09:20:31 +02:00
parent 6c49740ba2
commit 59f1fd2361
2 changed files with 20 additions and 2 deletions

View File

@ -2085,7 +2085,16 @@
If Controls.Dismiss(True, True, True) = True Then If Controls.Dismiss(True, True, True) = True Then
If CurrentStation Is Nothing Then If CurrentStation Is Nothing Then
MusicManager.Play(Screen.Level.MusicLoop) 'Play music depending on the player state in the level (surfing and riding):
If Screen.Level.Surfing = True Then
MusicManager.Play("surf", True) 'Play "surf" when player is surfing.
Else
If Screen.Level.Riding = True Then
MusicManager.Play("ride", True) 'Play "ride" when player is riding.
Else
MusicManager.Play(Level.MusicLoop, True) 'Play default MusicLoop.
End If
End If
End If End If
SoundManager.PlaySound("select") SoundManager.PlaySound("select")
Me.menuIndex = MenuScreens.Main Me.menuIndex = MenuScreens.Main

View File

@ -83,7 +83,16 @@
End If End If
Dim screens() As Screen.Identifications = {Screen.Identifications.PokegearScreen, Screen.Identifications.OverworldScreen} Dim screens() As Screen.Identifications = {Screen.Identifications.PokegearScreen, Screen.Identifications.OverworldScreen}
If screens.Contains(NewScreen.Identification) Then If screens.Contains(NewScreen.Identification) Then
MusicManager.Play(Screen.Level.MusicLoop, True, 0.02F) 'Play music depending on the player state in the level (surfing and riding):
If Screen.Level.Surfing = True Then
MusicManager.Play("surf", True) 'Play "surf" when player is surfing.
Else
If Screen.Level.Riding = True Then
MusicManager.Play("ride", True) 'Play "ride" when player is riding.
Else
MusicManager.Play(Level.MusicLoop, True, 0.02F) 'Play default MusicLoop.
End If
End If
End If End If
End If End If
Else Else