mirror of
https://github.com/ppy/osu
synced 2025-02-16 18:17:01 +00:00
Better initial beat handling
This commit is contained in:
parent
72404bff9a
commit
cfd8111120
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user