mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:37:28 +08:00
Remove construction of new ruleset
This commit is contained in:
parent
ed902d9325
commit
de63a1b578
@ -44,7 +44,7 @@ namespace osu.Game.Rulesets.Mania.Difficulty
|
||||
if (mods.Any(m => !m.Ranked))
|
||||
return 0;
|
||||
|
||||
IEnumerable<Mod> scoreIncreaseMods = new ManiaRuleset().GetModsFor(ModType.DifficultyIncrease);
|
||||
IEnumerable<Mod> scoreIncreaseMods = Ruleset.GetModsFor(ModType.DifficultyIncrease);
|
||||
|
||||
double scoreMultiplier = 1.0;
|
||||
foreach (var m in mods.Where(m => !scoreIncreaseMods.Contains(m)))
|
||||
|
@ -16,6 +16,7 @@ namespace osu.Game.Rulesets.Difficulty
|
||||
private readonly Dictionary<string, double> attributes = new Dictionary<string, double>();
|
||||
protected IDictionary<string, double> Attributes => attributes;
|
||||
|
||||
protected readonly Ruleset Ruleset;
|
||||
protected readonly IBeatmap Beatmap;
|
||||
protected readonly Score Score;
|
||||
|
||||
@ -23,9 +24,9 @@ namespace osu.Game.Rulesets.Difficulty
|
||||
|
||||
protected PerformanceCalculator(Ruleset ruleset, IBeatmap beatmap, Score score)
|
||||
{
|
||||
Score = score;
|
||||
|
||||
Ruleset = ruleset;
|
||||
Beatmap = beatmap;
|
||||
Score = score;
|
||||
|
||||
var diffCalc = ruleset.CreateDifficultyCalculator(beatmap, score.Mods);
|
||||
diffCalc.Calculate(attributes);
|
||||
|
Loading…
Reference in New Issue
Block a user