1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:03:08 +08:00

Apply rounding to ModTimeRamp to improve SPM consistency

This commit is contained in:
Bartłomiej Dach 2021-02-07 19:02:09 +01:00
parent 0e1ec703d3
commit 0229851c9c

View File

@ -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)