From 9d9f767af63bb5ca348b862a25b4f6025d62e9e6 Mon Sep 17 00:00:00 2001 From: KadeDeveloper Date: Wed, 11 Aug 2021 16:06:35 -0700 Subject: [PATCH] fix scroll speed changes --- source/PlayState.hx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 107442d..c94b853 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2187,6 +2187,8 @@ class PlayState extends MusicBeatState public var updateFrame = 0; + public var pastScrollChanges:Array = []; + override public function update(elapsed:Float) { #if !debug @@ -2249,8 +2251,12 @@ class PlayState extends MusicBeatState switch(i.type) { case "Scroll Speed Change": - if (i.position < curDecimalBeat) + if (i.position <= curDecimalBeat && !pastScrollChanges.contains(i)) + { + pastScrollChanges.push(i); + trace("SCROLL SPEED CHANGE to " + i.value); newScroll = i.value; + } } }