Fix crash on super high bpm kiai sections

This commit is contained in:
Siim Pender 2022-03-07 20:36:09 +02:00
parent e0d2c8ca5e
commit a02adfdbd4

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Audio.Track; using osu.Framework.Audio.Track;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
@ -37,7 +38,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
Child Child
.FadeTo(flash_opacity, EarlyActivationMilliseconds, Easing.OutQuint) .FadeTo(flash_opacity, EarlyActivationMilliseconds, Easing.OutQuint)
.Then() .Then()
.FadeOut(timingPoint.BeatLength - fade_length, Easing.OutSine); .FadeOut(Math.Max(0, timingPoint.BeatLength - fade_length), Easing.OutSine);
} }
} }
} }