1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 11:35:35 +08:00

Ensure true gameplay rate is finite when paused externally

This commit is contained in:
Bartłomiej Dach 2020-10-04 14:51:27 +02:00
parent ad42ce5639
commit 6f2b991b32

View File

@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using osu.Framework.Bindables;
using osu.Framework.Timing;
using osu.Framework.Utils;
namespace osu.Game.Screens.Play
{
@ -47,7 +48,12 @@ namespace osu.Game.Screens.Play
double baseRate = Rate;
foreach (var adjustment in NonGameplayAdjustments)
{
if (Precision.AlmostEquals(adjustment.Value, 0))
return 0;
baseRate /= adjustment.Value;
}
return baseRate;
}