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)
{
while (remainingCombo > 0)
{
int comboLength = Math.Min(assumedLengthOfRemainingCombos, remainingCombo);
int assumedCombosCount = (int)Math.Floor((double)remainingCombo / assumedLengthOfRemainingCombos);
totalDroppedScore += assumedCombosCount * estimateDroppedComboScoreAfterMiss(assumedLengthOfRemainingCombos);
remainingCombo -= comboLength;
totalDroppedScore += estimateDroppedComboScoreAfterMiss(comboLength);
}
remainingCombo -= assumedCombosCount * assumedLengthOfRemainingCombos;
if (remainingCombo > 0)
totalDroppedScore += estimateDroppedComboScoreAfterMiss(remainingCombo);
}
else
{