mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-12-13 01:31:49 -05: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
9b483de1da
commit
4d81aa0fe6
1 changed files with 2 additions and 2 deletions
|
@ -2963,7 +2963,7 @@ class PlayState extends MusicBeatSubState
|
||||||
{
|
{
|
||||||
targetSong: targetSong,
|
targetSong: targetSong,
|
||||||
targetDifficulty: PlayStatePlaylist.campaignDifficulty,
|
targetDifficulty: PlayStatePlaylist.campaignDifficulty,
|
||||||
targetVariation: currentVariation,
|
targetVariation: targetSong.getFirstValidVariation(PlayStatePlaylist.campaignDifficulty),
|
||||||
cameraFollowPoint: cameraFollowPoint.getPosition(),
|
cameraFollowPoint: cameraFollowPoint.getPosition(),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -2975,7 +2975,7 @@ class PlayState extends MusicBeatSubState
|
||||||
{
|
{
|
||||||
targetSong: targetSong,
|
targetSong: targetSong,
|
||||||
targetDifficulty: PlayStatePlaylist.campaignDifficulty,
|
targetDifficulty: PlayStatePlaylist.campaignDifficulty,
|
||||||
targetVariation: currentVariation,
|
targetVariation: targetSong.getFirstValidVariation(PlayStatePlaylist.campaignDifficulty),
|
||||||
cameraFollowPoint: cameraFollowPoint.getPosition(),
|
cameraFollowPoint: cameraFollowPoint.getPosition(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue