i have accidentally done this and wiped out my chart many times

This commit is contained in:
nebulazorua 2024-05-08 19:53:47 +08:00
parent a6948c3a38
commit 6fdc090ecc
1 changed files with 14 additions and 6 deletions

View File

@ -2549,12 +2549,20 @@ class PlayState extends MusicBeatSubState
// Redirect to the chart editor playing the current song.
if (controls.DEBUG_CHART)
{
disableKeys = true;
persistentUpdate = false;
FlxG.switchState(() -> new ChartEditorState(
{
targetSongId: currentSong.id,
}));
if (isChartingMode)
{
if (FlxG.sound.music != null) FlxG.sound.music.pause(); // Don't reset song position!
PlayState.instance.close(); // This only works because PlayState is a substate!
}
else
{
disableKeys = true;
persistentUpdate = false;
FlxG.switchState(() -> new ChartEditorState(
{
targetSongId: currentSong.id,
}));
}
}
#end