Introduce legacy timing point fp errors

This commit is contained in:
smoogipoo
2020-07-13 17:06:00 +09:00
parent 1116703e92
commit 0ea13dea55
3 changed files with 62 additions and 34 deletions

View File

@ -159,11 +159,20 @@ namespace osu.Game.Beatmaps.Formats
Mania,
}
internal class LegacyDifficultyControlPoint : DifficultyControlPoint
[Obsolete("Do not use unless you're a legacy ruleset and 100% sure.")]
public class LegacyDifficultyControlPoint : DifficultyControlPoint
{
public LegacyDifficultyControlPoint()
/// <summary>
/// Legacy BPM multiplier that introduces floating-point errors for rulesets that depend on it.
/// DO NOT USE THIS UNLESS 100% SURE.
/// </summary>
public readonly float BpmMultiplier;
public LegacyDifficultyControlPoint(double beatLength)
{
SpeedMultiplierBindable.Precision = double.Epsilon;
BpmMultiplier = beatLength < 0 ? Math.Clamp((float)-beatLength, 10, 10000) / 100f : 1;
}
}