mirror of https://github.com/ppy/osu
Cap LoopCount to at least 1
This commit is contained in:
parent
625711e6d2
commit
f148fbcc94
|
@ -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 @@ public class CommandLoop : CommandTimelineGroup
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue