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

Added a true AR/OD display when using DT/HT

This commit is contained in:
Givikap120 2023-08-24 16:49:42 +03:00
parent 90dfef2bb9
commit ed886a4dc3

View File

@ -126,6 +126,22 @@ namespace osu.Game.Screens.Select.Details
mod.ApplyToDifficulty(adjustedDifficulty);
}
if (baseDifficulty != null && mods.Value.Any(m => m is ModRateAdjust))
{
adjustedDifficulty ??= new BeatmapDifficulty(baseDifficulty);
foreach (var mod in mods.Value.OfType<ModRateAdjust>())
{
double speedChange = (float)mod.SpeedChange.Value;
double preempt = (int)IBeatmapDifficultyInfo.DifficultyRange(adjustedDifficulty.ApproachRate, 1800, 1200, 450) / speedChange;
adjustedDifficulty.ApproachRate = (float)(preempt > 1200 ? (1800 - preempt) / 120 : (1200 - preempt) / 150 + 5);
float hitwindow300 = (80.0f - 6 * adjustedDifficulty.OverallDifficulty) / (float)speedChange;
adjustedDifficulty.OverallDifficulty = (80.0f - hitwindow300) / 6;
}
}
switch (BeatmapInfo?.Ruleset.OnlineID)
{
case 3: