1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-25 05:11:19 +08:00

Fix possible NaN values

This commit is contained in:
smoogipoo
2020-08-28 22:23:44 +09:00
Unverified
parent 39f8b5eb85
commit 8ffc4309fb
+8
View File
@@ -105,6 +105,8 @@ namespace osu.Game.Scoring
this.score = score;
this.difficulties = difficulties;
Value = "0";
ScoringMode.BindValueChanged(onScoringModeChanged, true);
}
@@ -133,6 +135,12 @@ namespace osu.Game.Scoring
private void updateScore(int beatmapMaxCombo)
{
if (beatmapMaxCombo == 0)
{
Value = "0";
return;
}
var ruleset = score.Ruleset.CreateInstance();
var scoreProcessor = ruleset.CreateScoreProcessor();