mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:22:55 +08:00
Remove calculation for scores with combo above threshold, avoid division by zero
This commit is contained in:
parent
205d95e8c6
commit
c8d99e68a5
@ -262,9 +262,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
|||||||
{
|
{
|
||||||
double fullComboThreshold = Attributes.MaxCombo - 0.1 * Attributes.SliderCount;
|
double fullComboThreshold = Attributes.MaxCombo - 0.1 * Attributes.SliderCount;
|
||||||
if (scoreMaxCombo < fullComboThreshold)
|
if (scoreMaxCombo < fullComboThreshold)
|
||||||
comboBasedMissCount = fullComboThreshold / scoreMaxCombo;
|
comboBasedMissCount = fullComboThreshold / Math.Max(1.0, scoreMaxCombo);
|
||||||
else
|
|
||||||
comboBasedMissCount = Math.Pow((Attributes.MaxCombo - scoreMaxCombo) / (0.1 * Attributes.SliderCount), 3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.Max(countMiss, (int)Math.Floor(comboBasedMissCount));
|
return Math.Max(countMiss, (int)Math.Floor(comboBasedMissCount));
|
||||||
|
Loading…
Reference in New Issue
Block a user