1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-17 00:23:24 +08:00

Better initial beat handling

This commit is contained in:
Dean Herbert
2019-12-16 19:40:43 +09:00
Unverified
parent 72404bff9a
commit cfd8111120
+1 -2
View File
@@ -1,7 +1,6 @@
// 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 osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Track;
@@ -93,7 +92,7 @@ namespace osu.Game.Rulesets.Mods
}
if (!firstBeat.HasValue || beatIndex < firstBeat)
firstBeat = Math.Max(0, (beatIndex / segmentLength + 1) * segmentLength);
firstBeat = beatIndex < 0 ? 0 : (beatIndex / segmentLength + 1) * segmentLength;
if (beatIndex >= firstBeat)
{