1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 07:22:55 +08:00

Merge pull request #20683 from peppy/storyboard-handle-backwards-events

Add support for weird storyboards which have backwards events
This commit is contained in:
Dan Balasescu 2022-10-11 17:12:22 +09:00 committed by GitHub
commit 045eb884b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,10 @@ namespace osu.Game.Storyboards
public void Add(Easing easing, double startTime, double endTime, T startValue, T endValue)
{
if (endTime < startTime)
return;
{
(startTime, endTime) = (endTime, startTime);
(startValue, endValue) = (endValue, startValue);
}
commands.Add(new TypedCommand { Easing = easing, StartTime = startTime, EndTime = endTime, StartValue = startValue, EndValue = endValue });