From 690579843a7d9dbf90741fe11c92419d7f1fbf87 Mon Sep 17 00:00:00 2001 From: Kade M Date: Wed, 7 Jul 2021 16:24:16 -0700 Subject: [PATCH] stacked notes no longer drop your inputs --- source/ChartingState.hx | 2 +- source/PlayState.hx | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 0b38c9a..5de9335 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -1504,7 +1504,7 @@ class ChartingState extends MusicBeatState "song": _song }; - var data:String = Json.stringify(json); + var data:String = Json.stringify(json,null," "); if ((data != null) && (data.length > 0)) { diff --git a/source/PlayState.hx b/source/PlayState.hx index 5123167..c2e0486 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1460,8 +1460,29 @@ class PlayState extends MusicBeatState if (dataNotes.length != 0) { + var coolNote = dataNotes[0]; + if (dataNotes.length > 1) // stacked notes or really close ones + { + for(i in 0...dataNotes.length) + { + if (i == 0) // skip the first note + continue; + + var note = dataNotes[i]; + + if (!note.isSustainNote && (note.strumTime - coolNote.strumTime) < 2) + { + trace('found a stacked/really close note ' + (note.strumTime - coolNote.strumTime)); + // just fuckin remove it since it's a stacked note and shouldn't be there + note.kill(); + notes.remove(note, true); + note.destroy(); + } + } + } + goodNoteHit(coolNote); var noteDiff:Float = -(coolNote.strumTime - Conductor.songPosition); ana.hit = true; @@ -1469,7 +1490,12 @@ class PlayState extends MusicBeatState ana.nearestNote = [coolNote.strumTime,coolNote.noteData,coolNote.sustainLength]; } else if (!FlxG.save.data.ghost) + { noteMiss(data,null); + ana.hit = false; + ana.hitJudge = "shit"; + ana.nearestNote = []; + } }