From 1caa36953fd29c4c0401b560fac549e98e39d5cc Mon Sep 17 00:00:00 2001 From: Burgerballs <107233412+Burgerballs@users.noreply.github.com> Date: Wed, 4 Jan 2023 16:28:30 +0000 Subject: [PATCH 1/2] slight note.hx code improvement lowers the amount of things note.hx needs to do every frame, therefore slightly increasing the speed of the game --- source/Note.hx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/source/Note.hx b/source/Note.hx index e3f20d53..54f99415 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -352,21 +352,15 @@ class Note extends FlxSprite if (mustPress) { // ok river - if (strumTime > Conductor.songPosition - Conductor.safeZoneOffset - && strumTime < Conductor.songPosition + (Conductor.safeZoneOffset * earlyHitMult)) - canBeHit = true; - else - canBeHit = false; - - if (strumTime < Conductor.songPosition - Conductor.safeZoneOffset && !wasGoodHit) - tooLate = true; + canBeHit = (strumTime > Conductor.songPosition - Conductor.safeZoneOffset && strumTime < Conductor.songPosition + (Conductor.safeZoneOffset * earlyHitMult)); + + tooLate = (strumTime < Conductor.songPosition - Conductor.safeZoneOffset && !wasGoodHit); } else { canBeHit = false; - if (strumTime <= Conductor.songPosition) - wasGoodHit = true; + wasGoodHit = (strumTime <= Conductor.songPosition); } if (tooLate || (parentNote != null && parentNote.tooLate)) From 7f3509890b9adea46ad1313523138600e5059b4d Mon Sep 17 00:00:00 2001 From: Burgerballs <107233412+Burgerballs@users.noreply.github.com> Date: Wed, 4 Jan 2023 17:16:11 +0000 Subject: [PATCH 2/2] thanks lunarcleint (: --- source/Note.hx | 1 + 1 file changed, 1 insertion(+) diff --git a/source/Note.hx b/source/Note.hx index 54f99415..f8be255b 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -228,6 +228,7 @@ class Note extends FlxSprite parentNote.childrenNotes.push(this); } else if (!isSustainNote) parentNote = null; + moves = false; }