Fix chart reset when charting and pressing chart key

This commit is contained in:
gamerbross 2024-06-10 16:53:32 +02:00
parent eb979a8625
commit 9618cd2128

View file

@ -2284,7 +2284,7 @@ class PlayState extends MusicBeatSubState
health += Constants.HEALTH_HOLD_BONUS_PER_SECOND * elapsed; health += Constants.HEALTH_HOLD_BONUS_PER_SECOND * elapsed;
songScore += Std.int(Constants.SCORE_HOLD_BONUS_PER_SECOND * elapsed); songScore += Std.int(Constants.SCORE_HOLD_BONUS_PER_SECOND * elapsed);
} }
// Make sure the player keeps singing while the note is held by the bot. // Make sure the player keeps singing while the note is held by the bot.
if (isBotPlayMode && currentStage != null && currentStage.getBoyfriend() != null && currentStage.getBoyfriend().isSinging()) if (isBotPlayMode && currentStage != null && currentStage.getBoyfriend() != null && currentStage.getBoyfriend().isSinging())
{ {
@ -2612,10 +2612,18 @@ class PlayState extends MusicBeatSubState
{ {
disableKeys = true; disableKeys = true;
persistentUpdate = false; persistentUpdate = false;
FlxG.switchState(() -> new ChartEditorState( if (isChartingMode)
{ {
targetSongId: currentSong.id, FlxG.sound.music?.pause();
})); this.close();
}
else
{
FlxG.switchState(() -> new ChartEditorState(
{
targetSongId: currentSong.id,
}));
}
} }
#end #end