mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17:26 +08:00
Fix duplicate scores showing
This commit is contained in:
parent
7f05c16c9f
commit
44dd7d65be
@ -8,7 +8,7 @@ using osu.Game.Scoring;
|
||||
|
||||
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 @@ namespace osu.Game.Screens.Multi.Play
|
||||
}
|
||||
|
||||
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
Block a user