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

Calculate true combo value in ManiaDifficultyCalculator

This commit is contained in:
Dan Balasescu 2022-06-02 19:16:31 +09:00
parent c06045f41f
commit b1ffffc1ac

View File

@ -52,10 +52,18 @@ namespace osu.Game.Rulesets.Mania.Difficulty
// This is done the way it is to introduce fractional differences in order to match osu-stable for the time being.
GreatHitWindow = Math.Ceiling((int)(getHitWindow300(mods) * clockRate) / clockRate),
ScoreMultiplier = getScoreMultiplier(mods),
MaxCombo = beatmap.HitObjects.Sum(h => h is HoldNote ? 2 : 1),
MaxCombo = beatmap.HitObjects.Sum(maxComboForObject)
};
}
private static int maxComboForObject(HitObject hitObject)
{
if (hitObject is HoldNote hold)
return 1 + (int)((hold.EndTime - hold.StartTime) / 100);
return 1;
}
protected override IEnumerable<DifficultyHitObject> CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate)
{
var sortedObjects = beatmap.HitObjects.ToArray();