From cfd811112061663c00edf15096273da32a1f5102 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 16 Dec 2019 19:40:43 +0900 Subject: [PATCH] Better initial beat handling --- osu.Game/Rulesets/Mods/ModNightcore.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game/Rulesets/Mods/ModNightcore.cs b/osu.Game/Rulesets/Mods/ModNightcore.cs index 16ed3a5e31..abbeca3150 100644 --- a/osu.Game/Rulesets/Mods/ModNightcore.cs +++ b/osu.Game/Rulesets/Mods/ModNightcore.cs @@ -1,7 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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) {