mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:03:11 +08:00
Apply rounding to ModTimeRamp to improve SPM consistency
This commit is contained in:
parent
0e1ec703d3
commit
0229851c9c
@ -79,7 +79,9 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
{
|
{
|
||||||
double amount = (time - beginRampTime) / Math.Max(1, finalRateTime - beginRampTime);
|
double amount = (time - beginRampTime) / Math.Max(1, finalRateTime - beginRampTime);
|
||||||
double ramp = InitialRate.Value + (FinalRate.Value - InitialRate.Value) * Math.Clamp(amount, 0, 1);
|
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)
|
public virtual void Update(Playfield playfield)
|
||||||
|
Loading…
Reference in New Issue
Block a user