Don't attempt to submit score when nothing has been hit

This commit is contained in:
Dean Herbert 2021-07-04 15:14:25 +09:00
parent 49090a0d1b
commit ef82528309

View File

@ -10,6 +10,7 @@ using osu.Framework.Logging;
using osu.Framework.Screens;
using osu.Game.Online.API;
using osu.Game.Online.Rooms;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
namespace osu.Game.Screens.Play
@ -144,6 +145,10 @@ namespace osu.Game.Screens.Play
if (scoreSubmissionSource != null)
return scoreSubmissionSource.Task;
// if the user never hit anything, this score should not be counted in any way.
if (!score.ScoreInfo.Statistics.Any(s => s.Key.IsHit()))
return Task.CompletedTask;
scoreSubmissionSource = new TaskCompletionSource<bool>();
var request = CreateSubmissionRequest(score, token.Value);