1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 17:33:22 +08:00

Fix hold note crashing with 0 length

This commit is contained in:
smoogipoo 2021-04-22 19:51:33 +09:00
parent 30e6ea4291
commit 4148d473e3

View File

@ -221,7 +221,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
// As the note is being held, adjust the size of the sizing container. This has two effects:
// 1. The contained masking container will mask the body and ticks.
// 2. The head note will move along with the new "head position" in the container.
if (Head.IsHit && releaseTime == null)
if (Head.IsHit && releaseTime == null && DrawHeight > 0)
{
// 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);