mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:42:56 +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;
|
protected override int SectionLength => 750;
|
||||||
|
|
||||||
private readonly float halfCatchWidth;
|
private float halfCatchWidth;
|
||||||
|
|
||||||
public CatchDifficultyCalculator(Ruleset ruleset, WorkingBeatmap beatmap)
|
public CatchDifficultyCalculator(Ruleset ruleset, WorkingBeatmap beatmap)
|
||||||
: base(ruleset, 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);
|
var catcher = new CatcherArea.Catcher(beatmap.BeatmapInfo.BaseDifficulty);
|
||||||
halfCatchWidth = catcher.CatchWidth * 0.5f;
|
halfCatchWidth = catcher.CatchWidth * 0.5f;
|
||||||
|
|
||||||
|
@ -63,6 +63,8 @@ namespace osu.Game.Rulesets.Difficulty
|
|||||||
|
|
||||||
private DifficultyAttributes calculate(IBeatmap beatmap, Mod[] mods, double clockRate)
|
private DifficultyAttributes calculate(IBeatmap beatmap, Mod[] mods, double clockRate)
|
||||||
{
|
{
|
||||||
|
PreProcess(beatmap, mods, clockRate);
|
||||||
|
|
||||||
var skills = CreateSkills(beatmap);
|
var skills = CreateSkills(beatmap);
|
||||||
|
|
||||||
if (!beatmap.HitObjects.Any())
|
if (!beatmap.HitObjects.Any())
|
||||||
@ -99,6 +101,13 @@ namespace osu.Game.Rulesets.Difficulty
|
|||||||
return CreateDifficultyAttributes(beatmap, mods, skills, clockRate);
|
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>
|
/// <summary>
|
||||||
/// Creates all <see cref="Mod"/> combinations which adjust the <see cref="Beatmap"/> difficulty.
|
/// Creates all <see cref="Mod"/> combinations which adjust the <see cref="Beatmap"/> difficulty.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user