[BUGFIX] Ensure the variation used for the next song is valid.
When playing in story mode, `PlayState` assumes all the songs use the same variation, which is usually true, but not guaranteed. This PR makes `PlayState` use the `getFirstValidVariation` method to find the valid variation instead of using the `currentVariation` variable, which might not be valid.
This commit is contained in:
@@ -2963,7 +2963,7 @@ class PlayState extends MusicBeatSubState
|
||||
{
|
||||
targetSong: targetSong,
|
||||
targetDifficulty: PlayStatePlaylist.campaignDifficulty,
|
||||
targetVariation: currentVariation,
|
||||
targetVariation: targetSong.getFirstValidVariation(PlayStatePlaylist.campaignDifficulty),
|
||||
cameraFollowPoint: cameraFollowPoint.getPosition(),
|
||||
});
|
||||
});
|
||||
@@ -2975,7 +2975,7 @@ class PlayState extends MusicBeatSubState
|
||||
{
|
||||
targetSong: targetSong,
|
||||
targetDifficulty: PlayStatePlaylist.campaignDifficulty,
|
||||
targetVariation: currentVariation,
|
||||
targetVariation: targetSong.getFirstValidVariation(PlayStatePlaylist.campaignDifficulty),
|
||||
cameraFollowPoint: cameraFollowPoint.getPosition(),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user