mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 14:02:55 +08:00
Merge pull request #2804 from smoogipoo/mania-keymod-optimisation
Don't compute keymod difficulties for mania-specific beatmap
This commit is contained in:
commit
62a2a5fbb4
@ -29,9 +29,12 @@ namespace osu.Game.Rulesets.Mania.Difficulty
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private const double decay_weight = 0.9;
|
private const double decay_weight = 0.9;
|
||||||
|
|
||||||
|
private readonly bool isForCurrentRuleset;
|
||||||
|
|
||||||
public ManiaDifficultyCalculator(Ruleset ruleset, WorkingBeatmap beatmap)
|
public ManiaDifficultyCalculator(Ruleset ruleset, WorkingBeatmap beatmap)
|
||||||
: base(ruleset, beatmap)
|
: base(ruleset, beatmap)
|
||||||
{
|
{
|
||||||
|
isForCurrentRuleset = beatmap.BeatmapInfo.Ruleset.Equals(ruleset.RulesetInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override DifficultyAttributes Calculate(IBeatmap beatmap, Mod[] mods, double timeRate)
|
protected override DifficultyAttributes Calculate(IBeatmap beatmap, Mod[] mods, double timeRate)
|
||||||
@ -129,22 +132,35 @@ namespace osu.Game.Rulesets.Mania.Difficulty
|
|||||||
return difficulty;
|
return difficulty;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Mod[] DifficultyAdjustmentMods => new Mod[]
|
protected override Mod[] DifficultyAdjustmentMods
|
||||||
{
|
{
|
||||||
new ManiaModDoubleTime(),
|
get
|
||||||
new ManiaModHalfTime(),
|
{
|
||||||
new ManiaModEasy(),
|
var mods = new Mod[]
|
||||||
new ManiaModHardRock(),
|
{
|
||||||
new ManiaModKey1(),
|
new ManiaModDoubleTime(),
|
||||||
new ManiaModKey2(),
|
new ManiaModHalfTime(),
|
||||||
new ManiaModKey3(),
|
new ManiaModEasy(),
|
||||||
new ManiaModKey4(),
|
new ManiaModHardRock(),
|
||||||
new ManiaModKey5(),
|
};
|
||||||
new ManiaModKey6(),
|
|
||||||
new ManiaModKey7(),
|
|
||||||
new ManiaModKey8(),
|
|
||||||
new ManiaModKey9(),
|
|
||||||
};
|
|
||||||
|
|
||||||
|
if (isForCurrentRuleset)
|
||||||
|
return mods;
|
||||||
|
|
||||||
|
// if we are a convert, we can be played in any key mod.
|
||||||
|
return mods.Concat(new Mod[]
|
||||||
|
{
|
||||||
|
new ManiaModKey1(),
|
||||||
|
new ManiaModKey2(),
|
||||||
|
new ManiaModKey3(),
|
||||||
|
new ManiaModKey4(),
|
||||||
|
new ManiaModKey5(),
|
||||||
|
new ManiaModKey6(),
|
||||||
|
new ManiaModKey7(),
|
||||||
|
new ManiaModKey8(),
|
||||||
|
new ManiaModKey9(),
|
||||||
|
}).ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user