1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-21 05:09:57 +08:00

Fix LegacyDrainingHealthProcessor drain rate computation diverging to infinity

This commit is contained in:
Bartłomiej Dach
2024-04-23 18:37:15 +02:00
Unverified
parent 221af74f95
commit 787e60f706
@@ -129,6 +129,13 @@ namespace osu.Game.Rulesets.Scoring
OnIterationFail?.Invoke($"FAILED drop {testDrop}: recovery too low ({recovery} < {hpRecoveryAvailable})");
}
if (!fail && double.IsInfinity(HpMultiplierNormal))
{
OnIterationSuccess?.Invoke("Drain computation algorithm diverged to infinity. PASSING with zero drop, resetting HP multiplier to 1.");
HpMultiplierNormal = 1;
return 0;
}
if (!fail)
{
OnIterationSuccess?.Invoke($"PASSED drop {testDrop}");