mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 01:55:52 -05:00
Fix an issue where hold notes early in a song would not render properly.
This commit is contained in:
parent
43872bb213
commit
b1c9332830
1 changed files with 5 additions and 3 deletions
|
@ -149,9 +149,9 @@ class SustainTrail extends FlxSprite
|
||||||
if (sustainLength == s) return s;
|
if (sustainLength == s) return s;
|
||||||
|
|
||||||
height = sustainHeight(s, getScrollSpeed());
|
height = sustainHeight(s, getScrollSpeed());
|
||||||
// updateColorTransform();
|
this.sustainLength = s;
|
||||||
updateClipping();
|
updateClipping();
|
||||||
return sustainLength = s;
|
return this.sustainLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -162,13 +162,15 @@ class SustainTrail extends FlxSprite
|
||||||
public function updateClipping(songTime:Float = 0):Void
|
public function updateClipping(songTime:Float = 0):Void
|
||||||
{
|
{
|
||||||
var clipHeight:Float = FlxMath.bound(sustainHeight(sustainLength - (songTime - strumTime), getScrollSpeed()), 0, height);
|
var clipHeight:Float = FlxMath.bound(sustainHeight(sustainLength - (songTime - strumTime), getScrollSpeed()), 0, height);
|
||||||
if (clipHeight == 0)
|
if (clipHeight <= 0.1)
|
||||||
{
|
{
|
||||||
visible = false;
|
visible = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
visible = true;
|
visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
var bottomHeight:Float = graphic.height * zoom * endOffset;
|
var bottomHeight:Float = graphic.height * zoom * endOffset;
|
||||||
var partHeight:Float = clipHeight - bottomHeight;
|
var partHeight:Float = clipHeight - bottomHeight;
|
||||||
|
|
Loading…
Reference in a new issue