From 477df166ecaeb8e319c29f812e07abfa994fe5dd Mon Sep 17 00:00:00 2001 From: MaybeMaru <97055307+MaybeMaru@users.noreply.github.com> Date: Sun, 5 May 2024 15:21:48 +0200 Subject: [PATCH] fix uncalled step hits on lagspikes --- source/funkin/util/backend/MusicBeat.hx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/funkin/util/backend/MusicBeat.hx b/source/funkin/util/backend/MusicBeat.hx index e75b7607..6a0d00ac 100644 --- a/source/funkin/util/backend/MusicBeat.hx +++ b/source/funkin/util/backend/MusicBeat.hx @@ -33,8 +33,12 @@ class MusicBeat extends FlxBasic updateBeat(); updateSection(); - if (lastStep != curStep) if (curStep > -1) - stepHit(); + if (curStep > lastStep) if (curStep > -1) { + for (i in 0...(curStep - lastStep)) { + curStep = lastStep + i + 1; + stepHit(); + } + } #if FLX_DEBUG FlxG.watch.addQuick("curSection", curSection);