1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

fixed CI (again)

This commit is contained in:
Givikap120 2024-08-17 20:27:39 +03:00
parent cdd8f55729
commit 8b6106c2fe
3 changed files with 24 additions and 10 deletions

View File

@ -82,13 +82,25 @@ namespace osu.Game.Rulesets.Osu.Difficulty
double preempt = IBeatmapDifficultyInfo.DifficultyRange(beatmap.Difficulty.ApproachRate, 1800, 1200, 450) / clockRate;
double drainRate = beatmap.Difficulty.DrainRate;
ProgressiveCalculationBeatmap pcBeatmap = beatmap as ProgressiveCalculationBeatmap;
int maxCombo;
int hitCirclesCount, sliderCount, spinnerCount;
int maxCombo = pcBeatmap != null ? pcBeatmap.GetMaxCombo() : beatmap.GetMaxCombo();
if (beatmap is ProgressiveCalculationBeatmap pcBeatmap)
{
maxCombo = pcBeatmap.GetMaxCombo();
int hitCirclesCount = pcBeatmap != null ? pcBeatmap.GetHitObjectCountOf(typeof(HitCircle)) : beatmap.HitObjects.Count(h => h is HitCircle);
int sliderCount = pcBeatmap != null ? pcBeatmap.GetHitObjectCountOf(typeof(Slider)) : beatmap.HitObjects.Count(h => h is Slider);
int spinnerCount = pcBeatmap != null ? pcBeatmap.GetHitObjectCountOf(typeof(Spinner)) : beatmap.HitObjects.Count(h => h is Spinner);
hitCirclesCount = pcBeatmap.GetHitObjectCountOf(typeof(HitCircle));
sliderCount = pcBeatmap.GetHitObjectCountOf(typeof(Slider));
spinnerCount = pcBeatmap.GetHitObjectCountOf(typeof(Spinner));
}
else
{
maxCombo = beatmap.GetMaxCombo();
hitCirclesCount = beatmap.HitObjects.Count(h => h is HitCircle);
sliderCount = beatmap.HitObjects.Count(h => h is Slider);
spinnerCount = beatmap.HitObjects.Count(h => h is Spinner);
}
HitWindows hitWindows = new OsuHitWindows();
hitWindows.SetDifficulty(beatmap.Difficulty.OverallDifficulty);

View File

@ -315,13 +315,14 @@ namespace osu.Game.Rulesets.Difficulty
private readonly List<HitObject> hitObjects = new List<HitObject>();
private Dictionary<Type, int> hitObjectsCounts = new Dictionary<Type, int>();
private readonly Dictionary<Type, int> hitObjectsCounts = new Dictionary<Type, int>();
public int GetHitObjectCountOf(Type type) => hitObjectsCounts.GetValueOrDefault(type);
IReadOnlyList<HitObject> IBeatmap.HitObjects => hitObjects;
private int comboObjectIndex = 0, combo = 0;
private int comboObjectIndex, combo;
public int GetMaxCombo()
{
for (; comboObjectIndex < hitObjects.Count; comboObjectIndex++)

View File

@ -60,6 +60,7 @@ namespace osu.Game.Rulesets.Difficulty.Skills
}
double currentStrain = StrainValueAt(current);
if (currentSectionPeak < currentStrain)
{
currentSectionPeak = currentStrain;
@ -171,9 +172,9 @@ namespace osu.Game.Rulesets.Difficulty.Skills
}
private List<double>? savedSortedStrains;
private double savedCurrentStrain = 0;
private bool isSavedCurrentStrainRelevant = false;
private int amountOfStrainsAddedSinceSave = 0;
private double savedCurrentStrain;
private bool isSavedCurrentStrainRelevant;
private int amountOfStrainsAddedSinceSave;
protected static void InsertElementInReverseSortedList(List<double> list, double element)
{