From e6741869e83c6ac4338e78ec8969a03221166022 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 16 Oct 2020 04:15:17 -0700 Subject: [PATCH] fixed issue with desync --- source/MusicBeatState.hx | 1 - source/PlayState.hx | 17 ++++------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/source/MusicBeatState.hx b/source/MusicBeatState.hx index ce792d803..5b41c228c 100644 --- a/source/MusicBeatState.hx +++ b/source/MusicBeatState.hx @@ -47,7 +47,6 @@ class MusicBeatState extends FlxUIState private function updateCurStep():Void { - Conductor.songPosition = FlxG.sound.music.time; curStep = Math.floor(Conductor.songPosition / Conductor.stepCrochet); } diff --git a/source/PlayState.hx b/source/PlayState.hx index 186778436..b111368bf 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -260,28 +260,20 @@ class PlayState extends MusicBeatState var playerCounter:Int = 0; var daBeats:Int = 0; // Not exactly representative of 'daBeats' lol, just how much it has looped - var totalLength:Int = 0; // Total length of the song, in beats; for (section in noteData) { - var dumbassSection:Array = section.notes; - var coolSection:Int = Std.int(section.lengthInSteps / 4); - if (coolSection <= 4) // FIX SINCE MOST THE SHIT I MADE WERE ONLY 3 HTINGS LONG LOl - coolSection = 4; - else if (coolSection <= 8) - coolSection = 8; - - for (songNotes in dumbassSection) + for (songNotes in section.notes) { sectionScores[0].push(0); sectionScores[1].push(0); - var daStrumTime:Float = songNotes[0] + (Conductor.stepCrochet * section.lengthInSteps); + var daStrumTime:Float = songNotes[0]; trace(daStrumTime); var daNoteData:Int = songNotes[1]; - var daStrumTime:Float = daStrumTime; + // var daStrumTime:Float = daStrumTime; var oldNote:Note; if (unspawnNotes.length > 0) @@ -298,7 +290,7 @@ class PlayState extends MusicBeatState if (swagNote.mustPress) { - swagNote.x += (FlxG.width / 2); // general offset + swagNote.x += FlxG.width / 2; // general offset } else { @@ -323,7 +315,6 @@ class PlayState extends MusicBeatState if (section.mustHitSection) sectionLengths.push(Math.round(coolSection / 4)); */ - totalLength += Math.round(coolSection / 4); daBeats += 1; }