From 7641259432ced4ad088d263780c9c688bb68177d Mon Sep 17 00:00:00 2001 From: lunarcleint <88809950+lunarcleint@users.noreply.github.com> Date: Sun, 20 Aug 2023 01:52:38 -0700 Subject: [PATCH] game goes to charter after ending song from charter --- source/funkin/editors/charter/Charter.hx | 1 - source/funkin/editors/charter/CharterSelection.hx | 1 + source/funkin/game/PlayState.hx | 6 ++++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 32cb7ab4..20c8c05d 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -607,7 +607,6 @@ class Charter extends UIState { : CoolUtil.floorInt((mousePos.y - dragStartPos.y) / 40); var horizontalChange:Int = CoolUtil.floorInt((mousePos.x - dragStartPos.x) / 40); var changePoint:FlxPoint = FlxPoint.get(verticalChange, horizontalChange); - trace(dragStartPos, hoverOffset,changePoint); for (s in selection) { if (!s.draggable) continue; diff --git a/source/funkin/editors/charter/CharterSelection.hx b/source/funkin/editors/charter/CharterSelection.hx index 74f1fe6d..6cd47835 100644 --- a/source/funkin/editors/charter/CharterSelection.hx +++ b/source/funkin/editors/charter/CharterSelection.hx @@ -129,6 +129,7 @@ class CharterSelection extends EditorTreeMenu { // Add to List freeplayList.songs.insert(0, creation.meta); + @:privateAccess main.preAdd(option); main.members.insert(1, option); // @:privateAccess main.__firstFrame = true; } diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 4cdb4b35..18d3f193 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -1338,8 +1338,10 @@ class PlayState extends MusicBeatState } else { - trace('WENT BACK TO FREEPLAY??'); - FlxG.switchState(new FreeplayState()); + if (chartingMode) + FlxG.switchState(new funkin.editors.charter.Charter(SONG.meta.name, difficulty, false)); + else + FlxG.switchState(new FreeplayState()); } }