stacked notes no longer drop your inputs

This commit is contained in:
Kade M 2021-07-07 16:24:16 -07:00
parent 1f75d363b3
commit 690579843a
2 changed files with 27 additions and 1 deletions

View File

@ -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))
{

View File

@ -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 = [];
}
}