1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 03:22:54 +08:00

Remove loop in combo score loss estimation calculation

This commit is contained in:
Bartłomiej Dach 2024-01-08 19:49:22 +01:00
parent ea7078fab5
commit c4ac53002c
No known key found for this signature in database

View File

@ -519,13 +519,13 @@ namespace osu.Game.Database
if (assumedLengthOfRemainingCombos > 0) if (assumedLengthOfRemainingCombos > 0)
{ {
while (remainingCombo > 0) int assumedCombosCount = (int)Math.Floor((double)remainingCombo / assumedLengthOfRemainingCombos);
{ totalDroppedScore += assumedCombosCount * estimateDroppedComboScoreAfterMiss(assumedLengthOfRemainingCombos);
int comboLength = Math.Min(assumedLengthOfRemainingCombos, remainingCombo);
remainingCombo -= comboLength; remainingCombo -= assumedCombosCount * assumedLengthOfRemainingCombos;
totalDroppedScore += estimateDroppedComboScoreAfterMiss(comboLength);
} if (remainingCombo > 0)
totalDroppedScore += estimateDroppedComboScoreAfterMiss(remainingCombo);
} }
else else
{ {