From 02952e111f04e1f2d686610c4066e6b6d18f3f4b Mon Sep 17 00:00:00 2001 From: lunarcleint <88809950+lunarcleint@users.noreply.github.com> Date: Sat, 3 Feb 2024 00:53:41 -0700 Subject: [PATCH] song pos stays the same through playtesting :D --- source/funkin/editors/charter/Charter.hx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index eeda03c0..ec5a3516 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -23,6 +23,7 @@ import openfl.net.FileReference; class Charter extends UIState { public static var __song:String; + public static var __lastPos:Float; static var __diff:String; static var __reload:Bool; @@ -456,10 +457,11 @@ class Charter extends UIState { public function loadSong() { if (__reload) { - EventsData.reloadEvents(); + EventsData.reloadEvents(); __lastPos = 0; PlayState.loadSong(__song, __diff, false, false); } Conductor.setupSong(PlayState.SONG); + Conductor.songPosition = __lastPos; noteTypes = PlayState.SONG.noteTypes; // noteTypes = ["Hurt Note", "Bullet Note", "Penis Note", "Boobs Note"]; @@ -930,7 +932,7 @@ class Charter extends UIState { #end var __crochet:Float; - var __autosaveElapsed:Float; + // var __autosaveElapsed:Float; public override function update(elapsed:Float) { updateNoteLogic(elapsed); @@ -1011,6 +1013,7 @@ class Charter extends UIState { vocals.pause(); for (strumLine in strumLines.members) strumLine.vocals.pause(); } + __lastPos = Conductor.songPosition; songPosInfo.text = '${CoolUtil.timeToStr(Conductor.songPosition)} / ${CoolUtil.timeToStr(songLength)}' + '\nStep: ${curStep}' @@ -1025,11 +1028,13 @@ class Charter extends UIState { WindowUtils.prefix = undos.unsaved ? "* " : ""; SaveWarning.showWarning = undos.unsaved; + /* __autosaveElapsed += elapsed; if (__autosaveElapsed > 5) { // trace("some autosaves"); __autosaveElapsed = 0; } + */ } public static var startTime:Float = 0;