mirror of https://github.com/ppy/osu
Fix duplicate scores showing
This commit is contained in:
parent
7f05c16c9f
commit
44dd7d65be
|
@ -8,7 +8,7 @@
|
|||
|
||||
namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
public class SubmitRoomScoreRequest : APIRequest
|
||||
public class SubmitRoomScoreRequest : APIRequest<RoomScore>
|
||||
{
|
||||
private readonly int scoreId;
|
||||
private readonly int roomId;
|
||||
|
|
|
@ -97,22 +97,18 @@ protected override ResultsScreen CreateResults(ScoreInfo score)
|
|||
}
|
||||
|
||||
protected override ScoreInfo CreateScore()
|
||||
{
|
||||
submitScore();
|
||||
return base.CreateScore();
|
||||
}
|
||||
|
||||
private void submitScore()
|
||||
{
|
||||
var score = base.CreateScore();
|
||||
|
||||
score.TotalScore = (int)Math.Round(ScoreProcessor.GetStandardisedScore());
|
||||
|
||||
Debug.Assert(token != null);
|
||||
|
||||
var request = new SubmitRoomScoreRequest(token.Value, roomId.Value ?? 0, playlistItem.ID, score);
|
||||
request.Success += s => score.OnlineScoreID = s.ID;
|
||||
request.Failure += e => Logger.Error(e, "Failed to submit score");
|
||||
api.Queue(request);
|
||||
|
||||
return score;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
|
|
Loading…
Reference in New Issue