mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:17:26 +08:00
Fix difficulty calculation using the pre-mod catcher size
This commit is contained in:
parent
4031cad4f8
commit
5d9477e1e4
@ -23,11 +23,17 @@ namespace osu.Game.Rulesets.Catch.Difficulty
|
||||
|
||||
protected override int SectionLength => 750;
|
||||
|
||||
private readonly float halfCatchWidth;
|
||||
private float halfCatchWidth;
|
||||
|
||||
public CatchDifficultyCalculator(Ruleset ruleset, WorkingBeatmap beatmap)
|
||||
: base(ruleset, beatmap)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void PreProcess(IBeatmap beatmap, Mod[] mods, double clockRate)
|
||||
{
|
||||
base.PreProcess(beatmap, mods, clockRate);
|
||||
|
||||
var catcher = new CatcherArea.Catcher(beatmap.BeatmapInfo.BaseDifficulty);
|
||||
halfCatchWidth = catcher.CatchWidth * 0.5f;
|
||||
|
||||
|
@ -63,6 +63,8 @@ namespace osu.Game.Rulesets.Difficulty
|
||||
|
||||
private DifficultyAttributes calculate(IBeatmap beatmap, Mod[] mods, double clockRate)
|
||||
{
|
||||
PreProcess(beatmap, mods, clockRate);
|
||||
|
||||
var skills = CreateSkills(beatmap);
|
||||
|
||||
if (!beatmap.HitObjects.Any())
|
||||
@ -99,6 +101,13 @@ namespace osu.Game.Rulesets.Difficulty
|
||||
return CreateDifficultyAttributes(beatmap, mods, skills, clockRate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Computes any values to be used for difficulty calculation, prior to difficulty calculation taking place.
|
||||
/// </summary>
|
||||
protected virtual void PreProcess(IBeatmap beatmap, Mod[] mods, double clockRate)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates all <see cref="Mod"/> combinations which adjust the <see cref="Beatmap"/> difficulty.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user