Fix NaN values when stamina difficulty is 0

This commit is contained in:
Dan Balasescu 2024-11-01 22:52:51 +09:00
parent 9766d51559
commit 3e7fcc3c24
No known key found for this signature in database

View File

@ -86,8 +86,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty
double rhythmRating = rhythm.DifficultyValue() * rhythm_skill_multiplier;
double staminaRating = stamina.DifficultyValue() * stamina_skill_multiplier;
double monoStaminaRating = singleColourStamina.DifficultyValue() * stamina_skill_multiplier;
double monoStaminaFactor = Math.Pow(monoStaminaRating / staminaRating, 5);
double monoStaminaFactor = staminaRating == 0 ? 1 : Math.Pow(monoStaminaRating / staminaRating, 5);
double combinedRating = combinedDifficultyValue(rhythm, colour, stamina);
double starRating = rescale(combinedRating * 1.4);