mirror of
https://github.com/ppy/osu.git
synced 2026-05-17 06:32:36 +08:00
Better initial beat handling
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user