mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Reimplement as extension method on IBeatmap
Implementation has changed slightly to support arbitrary levels of nested hitobjects.
This commit is contained in:
@ -9,7 +9,6 @@ using osu.Game.Rulesets.Difficulty;
|
||||
using osu.Game.Rulesets.Difficulty.Preprocessing;
|
||||
using osu.Game.Rulesets.Difficulty.Skills;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Osu.Difficulty.Preprocessing;
|
||||
using osu.Game.Rulesets.Osu.Difficulty.Skills;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
@ -62,21 +61,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
|
||||
double preempt = IBeatmapDifficultyInfo.DifficultyRange(beatmap.Difficulty.ApproachRate, 1800, 1200, 450) / clockRate;
|
||||
double drainRate = beatmap.Difficulty.DrainRate;
|
||||
|
||||
int maxCombo = 0;
|
||||
|
||||
void countCombo(HitObject ho)
|
||||
{
|
||||
if (ho.CreateJudgement().MaxResult.AffectsCombo())
|
||||
maxCombo++;
|
||||
}
|
||||
|
||||
foreach (HitObject ho in beatmap.HitObjects)
|
||||
{
|
||||
countCombo(ho);
|
||||
foreach (HitObject nested in ho.NestedHitObjects)
|
||||
countCombo(nested);
|
||||
}
|
||||
int maxCombo = beatmap.GetMaxCombo();
|
||||
|
||||
int hitCirclesCount = beatmap.HitObjects.Count(h => h is HitCircle);
|
||||
int sliderCount = beatmap.HitObjects.Count(h => h is Slider);
|
||||
|
Reference in New Issue
Block a user