1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-27 02:32:59 +08:00

Fix possible NaN values

This commit is contained in:
smoogipoo 2020-08-28 22:23:44 +09:00
parent 39f8b5eb85
commit 8ffc4309fb

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();