mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-24 14:16:56 +00:00
[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:
parent
68b7610225
commit
bef2e98222
|
@ -2912,7 +2912,7 @@ class PlayState extends MusicBeatSubState
|
|||
{
|
||||
targetSong: targetSong,
|
||||
targetDifficulty: PlayStatePlaylist.campaignDifficulty,
|
||||
targetVariation: currentVariation,
|
||||
targetVariation: targetSong.getFirstValidVariation(PlayStatePlaylist.campaignDifficulty),
|
||||
cameraFollowPoint: cameraFollowPoint.getPosition(),
|
||||
});
|
||||
});
|
||||
|
@ -2924,7 +2924,7 @@ class PlayState extends MusicBeatSubState
|
|||
{
|
||||
targetSong: targetSong,
|
||||
targetDifficulty: PlayStatePlaylist.campaignDifficulty,
|
||||
targetVariation: currentVariation,
|
||||
targetVariation: targetSong.getFirstValidVariation(PlayStatePlaylist.campaignDifficulty),
|
||||
cameraFollowPoint: cameraFollowPoint.getPosition(),
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue