mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 04:02:59 +08:00
Apply beatmap converter mods in PerformanceCalculator
This commit is contained in:
parent
81186f8423
commit
3cd203699b
@ -2,7 +2,9 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
|
||||
namespace osu.Game.Rulesets.Scoring
|
||||
@ -23,9 +25,15 @@ namespace osu.Game.Rulesets.Scoring
|
||||
|
||||
protected PerformanceCalculator(Ruleset ruleset, Beatmap beatmap, Score score)
|
||||
{
|
||||
Beatmap = CreateBeatmapConverter().Convert(beatmap);
|
||||
Score = score;
|
||||
|
||||
var converter = CreateBeatmapConverter();
|
||||
|
||||
foreach (var mod in score.Mods.OfType<IApplicableToBeatmapConverter<TObject>>())
|
||||
mod.ApplyToBeatmapConverter(converter);
|
||||
|
||||
Beatmap = converter.Convert(beatmap);
|
||||
|
||||
var diffCalc = ruleset.CreateDifficultyCalculator(beatmap, score.Mods);
|
||||
diffCalc.Calculate(attributes);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user