mirror of https://github.com/ppy/osu
only compute flashlight in osu! difficulty calculations when required
This commit is contained in:
parent
4b847b68a2
commit
c5f392c17d
|
@ -40,7 +40,11 @@ protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beat
|
|||
double aimRatingNoSliders = Math.Sqrt(skills[1].DifficultyValue()) * difficulty_multiplier;
|
||||
double speedRating = Math.Sqrt(skills[2].DifficultyValue()) * difficulty_multiplier;
|
||||
double speedNotes = ((Speed)skills[2]).RelevantNoteCount();
|
||||
double flashlightRating = Math.Sqrt(skills[3].DifficultyValue()) * difficulty_multiplier;
|
||||
|
||||
double flashlightRating = 0.0;
|
||||
|
||||
if (mods.Any(h => h is OsuModFlashlight))
|
||||
flashlightRating = Math.Sqrt(skills[3].DifficultyValue()) * difficulty_multiplier;
|
||||
|
||||
double sliderFactor = aimRating > 0 ? aimRatingNoSliders / aimRating : 1;
|
||||
|
||||
|
@ -126,13 +130,17 @@ protected override IEnumerable<DifficultyHitObject> CreateDifficultyHitObjects(I
|
|||
|
||||
protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate)
|
||||
{
|
||||
return new Skill[]
|
||||
var skills = new List<Skill>
|
||||
{
|
||||
new Aim(mods, true),
|
||||
new Aim(mods, false),
|
||||
new Speed(mods),
|
||||
new Flashlight(mods)
|
||||
new Speed(mods)
|
||||
};
|
||||
|
||||
if (mods.Any(h => h is OsuModFlashlight))
|
||||
skills.Add(new Flashlight(mods));
|
||||
|
||||
return skills.ToArray();
|
||||
}
|
||||
|
||||
protected override Mod[] DifficultyAdjustmentMods => new Mod[]
|
||||
|
|
Loading…
Reference in New Issue