Skip to content

Commit

Permalink
Merge pull request #17150 from SiimPender/master
Browse files Browse the repository at this point in the history
Fix crash during kiai section on specific map due to negative transform duration
  • Loading branch information
peppy committed Mar 10, 2022
2 parents db5c2c1 + a1b7bf3 commit f82687a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion osu.Game.Rulesets.Osu/Skinning/Default/KiaiFlash.cs
@@ -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;
Expand Down Expand Up @@ -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);
}
}
}

0 comments on commit f82687a

Please sign in to comment.