From 306d84cd365b52ca930bc6ac92fba161af703c74 Mon Sep 17 00:00:00 2001 From: Yoshman29 Date: Thu, 27 Oct 2022 02:33:00 +0200 Subject: [PATCH] fuck you codename engine im watching steven universe with kay now --- source/funkin/game/Note.hx | 11 ----------- source/funkin/game/PlayState.hx | 13 +++++++++++++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/source/funkin/game/Note.hx b/source/funkin/game/Note.hx index 03165c52..db5a5207 100644 --- a/source/funkin/game/Note.hx +++ b/source/funkin/game/Note.hx @@ -170,17 +170,6 @@ class Note extends FlxSprite override function update(elapsed:Float) { super.update(elapsed); - - if (mustPress) - { - canBeHit = (strumTime > Conductor.songPosition - (Conductor.safeZoneOffset * latePressWindow) - && strumTime < Conductor.songPosition + (Conductor.safeZoneOffset * earlyPressWindow)); - - if (strumTime < Conductor.songPosition - Conductor.safeZoneOffset && !wasGoodHit) - tooLate = true; - } - else - canBeHit = false; } public function updateClipRect(strum:Strum) { diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 31a3dae8..bb8be432 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -939,14 +939,27 @@ class PlayState extends MusicBeatState if (generatedMusic) { + var toDelete:Array = []; notes.forEachAlive(function(daNote:Note) { + if (daNote.mustPress) + { + daNote.canBeHit = (daNote.strumTime > Conductor.songPosition - (Conductor.safeZoneOffset * daNote.latePressWindow) + && daNote.strumTime < Conductor.songPosition + (Conductor.safeZoneOffset * daNote.earlyPressWindow)); + + if (daNote.strumTime < Conductor.songPosition - Conductor.safeZoneOffset && !daNote.wasGoodHit) + daNote.tooLate = true; + } + else + canBeHit = false; + if (!daNote.mustPress && !daNote.wasGoodHit && daNote.strumTime <= Conductor.songPosition) goodNoteHit(daNote); // TODO: FIXED STEP CROCHET PER NOTES FOR BPM CHANGES if (daNote.wasGoodHit && daNote.isSustainNote && daNote.strumTime + (Conductor.stepCrochet) < Conductor.songPosition) { deleteNote(daNote); return; } + if (daNote.tooLate) { noteMiss(daNote); return;