From de575b3867fb2b91db85494d935db9c99dd934bc Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 22 May 2017 20:02:02 +0900 Subject: [PATCH] Early return if beatLength = 0. --- osu.Game/Graphics/Containers/BeatSyncedContainer.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Graphics/Containers/BeatSyncedContainer.cs b/osu.Game/Graphics/Containers/BeatSyncedContainer.cs index d4b042c34c..12ed015c92 100644 --- a/osu.Game/Graphics/Containers/BeatSyncedContainer.cs +++ b/osu.Game/Graphics/Containers/BeatSyncedContainer.cs @@ -25,8 +25,11 @@ namespace osu.Game.Graphics.Containers ControlPoint overridePoint; ControlPoint controlPoint = beatmap.Value.Beatmap.TimingInfo.TimingPointAt(currentTrackTime, out overridePoint); + if (controlPoint.BeatLength == 0) + return; + bool kiai = (overridePoint ?? controlPoint).KiaiMode; - int beat = controlPoint.BeatLength > 0 ? (int)((currentTrackTime - controlPoint.Time) / controlPoint.BeatLength) : 0; + int beat = (int)((currentTrackTime - controlPoint.Time) / controlPoint.BeatLength); // The beats before the start of the first control point are off by 1, this should do the trick if (currentTrackTime < controlPoint.Time)