From 565ab02eec8c37bd5aa2cfc31ec4092bff10b49d Mon Sep 17 00:00:00 2001 From: Aikoyori <12034280+Aikoyori@users.noreply.github.com> Date: Fri, 28 May 2021 12:53:57 +0700 Subject: [PATCH] finally seems to work --- source/ChartingState.hx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 2de2954..a347205 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -1321,7 +1321,7 @@ class ChartingState extends MusicBeatState var newSong = []; var millisecadd = (((measure*4)+step/4)*(60000/_song.bpm))+ms; - var totaladdsection = Std.int(60000/millisecadd*4); + var totaladdsection = Std.int((millisecadd/(60000/_song.bpm)/4)); trace(millisecadd,totaladdsection); if(millisecadd > 0) { @@ -1337,7 +1337,8 @@ class ChartingState extends MusicBeatState for (daSection in 0...(_song.notes.length)) { - var aimtosetsection = daSection+Std.int(Math.max(0,totaladdsection)); + var aimtosetsection = daSection+Std.int((totaladdsection)); + if(aimtosetsection<0) aimtosetsection = 0; newSong[aimtosetsection].mustHitSection = _song.notes[daSection].mustHitSection; newSong[aimtosetsection].altAnim = _song.notes[daSection].altAnim; //trace("section "+daSection); @@ -1359,6 +1360,7 @@ class ChartingState extends MusicBeatState //trace("DONE BITCH"); _song.notes = newSong; updateGrid(); + updateSectionUI(); updateNoteUI(); } private function addNote(?n:Note):Void