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
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 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)