From 0886402cab7de250f2f2516af4ccd803eadf4998 Mon Sep 17 00:00:00 2001 From: HEIHUAa <112499486+HEIHUAa@users.noreply.github.com> Date: Mon, 19 Jan 2026 15:50:13 +0800 Subject: [PATCH 1/4] optimize updateInput --- source/funkin/game/StrumLine.hx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/funkin/game/StrumLine.hx b/source/funkin/game/StrumLine.hx index e803bba8b4..9c0b04a17e 100644 --- a/source/funkin/game/StrumLine.hx +++ b/source/funkin/game/StrumLine.hx @@ -304,14 +304,14 @@ class StrumLine extends FlxTypedGroup { __notePerStrum = cast new haxe.ds.Vector(members.length); // [for(_ in 0...members.length) null]; - if (__justPressed.contains(true)) { - notes.forEachAlive(__inputProcessJustPressed); + if (__pressed.contains(true)) { + if (__justPressed.contains(true)) { + notes.forEachAlive(__inputProcessJustPressed); - if (!ghostTapping) for (k => pr in __justPressed) if (pr && __notePerStrum[k] == null) - PlayState.instance.noteMiss(this, null, k, ID); // FUCK YOU - } + if (!ghostTapping) for (k => pr in __justPressed) if (pr && __notePerStrum[k] == null) + PlayState.instance.noteMiss(this, null, k, ID); // FUCK YOU + } - if (__pressed.contains(true)) { for (e in __notePerStrum) if (e != null) PlayState.instance.goodNoteHit(this, e); @@ -324,7 +324,7 @@ class StrumLine extends FlxTypedGroup { } forEach(function(str:Strum) { - str.updatePlayerInput(str.__getPressed(this), str.__getJustPressed(this), str.__getJustReleased(this)); + str.updatePlayerInput(__pressed[str.ID], __justPressed[str.ID], __justReleased[str.ID]); }); PlayState.instance.gameAndCharsCall("onPostInputUpdate"); From 0c4dd322a582733cb2039de205027856cecd17fd Mon Sep 17 00:00:00 2001 From: HEIHUAa <112499486+HEIHUAa@users.noreply.github.com> Date: Mon, 19 Jan 2026 19:19:16 +0800 Subject: [PATCH 2/4] resize optimize --- source/funkin/game/StrumLine.hx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/funkin/game/StrumLine.hx b/source/funkin/game/StrumLine.hx index 9c0b04a17e..260d29ff91 100644 --- a/source/funkin/game/StrumLine.hx +++ b/source/funkin/game/StrumLine.hx @@ -284,9 +284,11 @@ class StrumLine extends FlxTypedGroup { if (cpu) return; - __pressed.resize(members.length); - __justPressed.resize(members.length); - __justReleased.resize(members.length); + if (__pressed.length != members.length) { + __pressed.resize(members.length); + __justPressed.resize(members.length); + __justReleased.resize(members.length); + } for (i in 0...members.length) { __pressed[i] = members[i].__getPressed(this); From 463f40d79ca4ef829bfb4901c6004ced909fd751 Mon Sep 17 00:00:00 2001 From: HEIHUAa <112499486+HEIHUAa@users.noreply.github.com> Date: Mon, 19 Jan 2026 20:12:09 +0800 Subject: [PATCH 3/4] __notePerStrum optimize --- source/funkin/game/StrumLine.hx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/funkin/game/StrumLine.hx b/source/funkin/game/StrumLine.hx index 260d29ff91..97aeb4a7cc 100644 --- a/source/funkin/game/StrumLine.hx +++ b/source/funkin/game/StrumLine.hx @@ -312,11 +312,11 @@ class StrumLine extends FlxTypedGroup { if (!ghostTapping) for (k => pr in __justPressed) if (pr && __notePerStrum[k] == null) PlayState.instance.noteMiss(this, null, k, ID); // FUCK YOU - } - for (e in __notePerStrum) - if (e != null) - PlayState.instance.goodNoteHit(this, e); + for (e in __notePerStrum) + if (e != null) + PlayState.instance.goodNoteHit(this, e); + } for (c in characters) if (c.lastAnimContext != DANCE) From 9425fbfcc96669dfa64dde4f890d2e4d57a34f75 Mon Sep 17 00:00:00 2001 From: HEIHUAa <112499486+HEIHUAa@users.noreply.github.com> Date: Tue, 20 Jan 2026 08:24:44 +0800 Subject: [PATCH 4/4] Update StrumLine.hx --- source/funkin/game/StrumLine.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/funkin/game/StrumLine.hx b/source/funkin/game/StrumLine.hx index 97aeb4a7cc..1fc38c0f99 100644 --- a/source/funkin/game/StrumLine.hx +++ b/source/funkin/game/StrumLine.hx @@ -253,7 +253,7 @@ class StrumLine extends FlxTypedGroup { var __notePerStrum:Array = []; function __inputProcessPressed(note:Note) { - if (__pressed[note.strumID] && note.isSustainNote && note.sustainParent.wasGoodHit && note.strumTime < __updateNote_songPos && !note.wasGoodHit) { + if (__pressed[note.strumID] && note.isSustainNote && note.strumTime < __updateNote_songPos && !note.wasGoodHit && note.sustainParent.wasGoodHit) { PlayState.instance.goodNoteHit(this, note); } }