1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 14:32:55 +08:00

prevent 2B objects from dividing by zero

This commit is contained in:
apollo-dw 2021-09-14 15:22:03 +01:00
parent 68050a4073
commit 8796e45f63
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
return Math.Max(
result + (jumpDistanceExp + travelDistanceExp + Math.Sqrt(travelDistanceExp * jumpDistanceExp)) / Math.Max(osuCurrent.DeltaTime, timing_threshold),
(Math.Sqrt(travelDistanceExp * jumpDistanceExp) + jumpDistanceExp + travelDistanceExp) / osuCurrent.DeltaTime
(Math.Sqrt(travelDistanceExp * jumpDistanceExp) + jumpDistanceExp + travelDistanceExp) / Math.Max(osuCurrent.DeltaTime, 1)
);
}

View File

@ -84,7 +84,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
}
}
return (1 + (speedBonus - 1) * 0.75) * angleBonus * (0.95 + speedBonus * Math.Pow(distance / single_spacing_threshold, 3.5)) / deltaTime;
return (1 + (speedBonus - 1) * 0.75) * angleBonus * (0.95 + speedBonus * Math.Pow(distance / single_spacing_threshold, 3.5)) / Math.Max(deltaTime, 1);
}
}
}