mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 19:22:54 +08:00
Don't attempt to submit score when nothing has been hit
This commit is contained in:
parent
49090a0d1b
commit
ef82528309
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user