1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:47:24 +08:00

Cap LoopCount to at least 1

This commit is contained in:
Sebastian Krajewski 2021-09-29 00:59:08 +02:00
parent 625711e6d2
commit f148fbcc94

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 System.Collections.Generic;
namespace osu.Game.Storyboards
@ -16,7 +17,7 @@ namespace osu.Game.Storyboards
public CommandLoop(double startTime, int loopCount)
{
LoopStartTime = startTime;
LoopCount = loopCount;
LoopCount = Math.Max(1, loopCount);
}
public override IEnumerable<CommandTimeline<T>.TypedCommand> GetCommands<T>(CommandTimelineSelector<T> timelineSelector, double offset = 0)