1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 01:27:29 +08:00

Fix hold notes bouncing with SV changes

This commit is contained in:
smoogipoo 2020-08-21 23:11:15 +09:00
parent 42ee9b75df
commit 8632c3adf0

View File

@ -223,8 +223,9 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
// 2. The head note will move along with the new "head position" in the container.
if (Head.IsHit && releaseTime == null)
{
float remainingHeight = (float)(Math.Max(0, HitObject.GetEndTime() - Time.Current) / HitObject.Duration);
sizingContainer.Height = Math.Clamp(remainingHeight, 0, 1);
// How far past the hit target this hold note is. Always a positive value.
float yOffset = Math.Max(0, Direction.Value == ScrollingDirection.Up ? -Y : Y);
sizingContainer.Height = Math.Clamp(1 - yOffset / DrawHeight, 0, 1);
}
}