From 0229851c9ca93570e68dbe056cc15d20099b1cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sun, 7 Feb 2021 19:02:09 +0100 Subject: [PATCH] Apply rounding to ModTimeRamp to improve SPM consistency --- osu.Game/Rulesets/Mods/ModTimeRamp.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Rulesets/Mods/ModTimeRamp.cs b/osu.Game/Rulesets/Mods/ModTimeRamp.cs index 7e801c3024..330945d3d3 100644 --- a/osu.Game/Rulesets/Mods/ModTimeRamp.cs +++ b/osu.Game/Rulesets/Mods/ModTimeRamp.cs @@ -79,7 +79,9 @@ namespace osu.Game.Rulesets.Mods { double amount = (time - beginRampTime) / Math.Max(1, finalRateTime - beginRampTime); double ramp = InitialRate.Value + (FinalRate.Value - InitialRate.Value) * Math.Clamp(amount, 0, 1); - return rate * ramp; + + // round the end result to match the bindable SpeedChange's precision, in case this is called externally. + return rate * Math.Round(ramp, 2); } public virtual void Update(Playfield playfield)