From b1c933283055bfd4c0431f5b820840a18d848a52 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Tue, 2 Jan 2024 01:33:10 -0500 Subject: [PATCH] Fix an issue where hold notes early in a song would not render properly. --- source/funkin/play/notes/SustainTrail.hx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/funkin/play/notes/SustainTrail.hx b/source/funkin/play/notes/SustainTrail.hx index ab4bf5f16..7367b97af 100644 --- a/source/funkin/play/notes/SustainTrail.hx +++ b/source/funkin/play/notes/SustainTrail.hx @@ -149,9 +149,9 @@ class SustainTrail extends FlxSprite if (sustainLength == s) return s; height = sustainHeight(s, getScrollSpeed()); - // updateColorTransform(); + this.sustainLength = s; updateClipping(); - return sustainLength = s; + return this.sustainLength; } /** @@ -162,13 +162,15 @@ class SustainTrail extends FlxSprite public function updateClipping(songTime:Float = 0):Void { var clipHeight:Float = FlxMath.bound(sustainHeight(sustainLength - (songTime - strumTime), getScrollSpeed()), 0, height); - if (clipHeight == 0) + if (clipHeight <= 0.1) { visible = false; return; } else + { visible = true; + } var bottomHeight:Float = graphic.height * zoom * endOffset; var partHeight:Float = clipHeight - bottomHeight;