Merge pull request #17150 from SiimPender/master

Fix crash during kiai section on specific map due to negative transform duration
This commit is contained in:
Dean Herbert 2022-03-10 18:09:41 +09:00 committed by GitHub
commit f82687a2c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
// 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.
using System;
using osu.Framework.Audio.Track;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
@ -37,7 +38,7 @@ protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint,
Child
.FadeTo(flash_opacity, EarlyActivationMilliseconds, Easing.OutQuint)
.Then()
.FadeOut(timingPoint.BeatLength - fade_length, Easing.OutSine);
.FadeOut(Math.Max(fade_length, timingPoint.BeatLength - fade_length), Easing.OutSine);
}
}
}