mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-15 11:22:55 +00:00
A fix requested by Eric
This commit is contained in:
parent
bef2e98222
commit
eb78b754f8
|
@ -2908,11 +2908,16 @@ class PlayState extends MusicBeatSubState
|
||||||
FunkinSound.playOnce(Paths.sound('Lights_Shut_off'), function() {
|
FunkinSound.playOnce(Paths.sound('Lights_Shut_off'), function() {
|
||||||
// no camFollow so it centers on horror tree
|
// no camFollow so it centers on horror tree
|
||||||
var targetSong:Song = SongRegistry.instance.fetchEntry(targetSongId);
|
var targetSong:Song = SongRegistry.instance.fetchEntry(targetSongId);
|
||||||
|
var targetVariation:String = currentVariation;
|
||||||
|
if (!targetSong.hasDifficulty(PlayStatePlaylist.campaignDifficulty, currentVariation))
|
||||||
|
{
|
||||||
|
targetVariation = targetSong.getFirstValidVariation(PlayStatePlaylist.campaignDifficulty) ?? Constants.DEFAULT_VARIATION;
|
||||||
|
}
|
||||||
LoadingState.loadPlayState(
|
LoadingState.loadPlayState(
|
||||||
{
|
{
|
||||||
targetSong: targetSong,
|
targetSong: targetSong,
|
||||||
targetDifficulty: PlayStatePlaylist.campaignDifficulty,
|
targetDifficulty: PlayStatePlaylist.campaignDifficulty,
|
||||||
targetVariation: targetSong.getFirstValidVariation(PlayStatePlaylist.campaignDifficulty),
|
targetVariation: targetVariation,
|
||||||
cameraFollowPoint: cameraFollowPoint.getPosition(),
|
cameraFollowPoint: cameraFollowPoint.getPosition(),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -2920,11 +2925,16 @@ class PlayState extends MusicBeatSubState
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var targetSong:Song = SongRegistry.instance.fetchEntry(targetSongId);
|
var targetSong:Song = SongRegistry.instance.fetchEntry(targetSongId);
|
||||||
|
var targetVariation:String = currentVariation;
|
||||||
|
if (!targetSong.hasDifficulty(PlayStatePlaylist.campaignDifficulty, currentVariation))
|
||||||
|
{
|
||||||
|
targetVariation = targetSong.getFirstValidVariation(PlayStatePlaylist.campaignDifficulty) ?? Constants.DEFAULT_VARIATION;
|
||||||
|
}
|
||||||
LoadingState.loadPlayState(
|
LoadingState.loadPlayState(
|
||||||
{
|
{
|
||||||
targetSong: targetSong,
|
targetSong: targetSong,
|
||||||
targetDifficulty: PlayStatePlaylist.campaignDifficulty,
|
targetDifficulty: PlayStatePlaylist.campaignDifficulty,
|
||||||
targetVariation: targetSong.getFirstValidVariation(PlayStatePlaylist.campaignDifficulty),
|
targetVariation: targetVariation,
|
||||||
cameraFollowPoint: cameraFollowPoint.getPosition(),
|
cameraFollowPoint: cameraFollowPoint.getPosition(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue