1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 23:27:25 +08:00

Moved ruleset decl in right place

This commit is contained in:
Givikap120 2023-08-25 01:02:12 +03:00
parent 17b9b1649a
commit 772633178c

View File

@ -129,11 +129,11 @@ namespace osu.Game.Screens.Select.Details
if (baseDifficulty != null && mods.Value.Any(m => m is ModRateAdjust))
{
adjustedDifficulty ??= new BeatmapDifficulty(baseDifficulty);
Ruleset ruleset = gameRuleset.Value.CreateInstance();
foreach (var mod in mods.Value.OfType<ModRateAdjust>())
{
double speedChange = (float)mod.SpeedChange.Value;
Ruleset ruleset = gameRuleset.Value.CreateInstance();
adjustedDifficulty.ApproachRate = ruleset.ChangeArFromRate(adjustedDifficulty.ApproachRate, speedChange);
adjustedDifficulty.OverallDifficulty = ruleset.ChangeOdFromRate(adjustedDifficulty.OverallDifficulty, speedChange);