fix notes deleting (LIVE ON STREAM!)

This commit is contained in:
KadeDev 2021-03-31 12:58:17 -07:00
parent 174fffcece
commit 200714f866
3 changed files with 64 additions and 77 deletions

View File

@ -1003,21 +1003,13 @@ class ChartingState extends MusicBeatState
updateNoteUI();
}
function deleteNote(note:Note):Void
{
trace(_song.notes[curSection].sectionNotes);
for (n in 0..._song.notes[curSection].sectionNotes.length)
for (i in _song.notes[curSection].sectionNotes)
{
var i = _song.notes[curSection].sectionNotes[n];
if (i == null)
continue;
if ((i[0] == note.strumTime + (note.strumTime == 0 ? 0 : 1)
? true : i[0] == note.strumTime)
&& i[1] % 4 == note.noteData)
// Why does it do this?
// I DONT FUCKING KNOW!!!!!!!!!!!!!!
if (i[0] == note.strumTime && i[1] % 4 == note.noteData)
{
trace('GAMING');
_song.notes[curSection].sectionNotes.remove(i);
}
}

View File

@ -48,7 +48,7 @@ class Note extends FlxSprite
x += 50;
// MAKE SURE ITS DEFINITELY OFF SCREEN?
y -= 2000;
this.strumTime = strumTime + FlxG.save.data.offset;
this.strumTime = strumTime;
this.noteData = noteData;
@ -121,13 +121,14 @@ class Note extends FlxSprite
animation.play('redScroll');
}
// trace(prevNote);
// we make sure its downscroll and its a SUSTAIN NOTE (aka a trail, not a note)
// and flip it so it doesn't look weird.
// THIS DOESN'T FUCKING FLIP THE NOTE, CONTRIBUTERS DON'T JUST COMMENT THIS OUT JESUS
if (FlxG.save.data.downscroll && sustainNote)
flipY = true;
if (isSustainNote && prevNote != null)
{
noteScore * 0.2;
@ -175,27 +176,21 @@ class Note extends FlxSprite
}
}
var oneTime:Bool = false;
override function update(elapsed:Float)
{
super.update(elapsed);
if (mustPress)
{
if ((strumTime > Conductor.songPosition - Conductor.safeZoneOffset
&& strumTime < Conductor.songPosition + Conductor.safeZoneOffset))
{
// The * 0.5 is so that it's easier to hit them too late, instead of too early
if (strumTime > Conductor.songPosition - Conductor.safeZoneOffset
&& strumTime < Conductor.songPosition + (Conductor.safeZoneOffset * 0.5))
canBeHit = true;
}
else
canBeHit = false;
if (strumTime < Conductor.songPosition - Conductor.safeZoneOffset && !wasGoodHit)
{
tooLate = true;
rating = "shit";
}
}
else
{