mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 21:32:57 +08:00
Merge pull request #15430 from bdach/fix-multi-submission
Fix multiplayer score submission not working
This commit is contained in:
commit
f67f42dc5b
@ -5,6 +5,7 @@ using System.Net.Http;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using osu.Framework.IO.Network;
|
using osu.Framework.IO.Network;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
|
using osu.Game.Online.Solo;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
|
|
||||||
namespace osu.Game.Online.Rooms
|
namespace osu.Game.Online.Rooms
|
||||||
@ -14,14 +15,14 @@ namespace osu.Game.Online.Rooms
|
|||||||
private readonly long scoreId;
|
private readonly long scoreId;
|
||||||
private readonly long roomId;
|
private readonly long roomId;
|
||||||
private readonly long playlistItemId;
|
private readonly long playlistItemId;
|
||||||
private readonly ScoreInfo scoreInfo;
|
private readonly SubmittableScore score;
|
||||||
|
|
||||||
public SubmitRoomScoreRequest(long scoreId, long roomId, long playlistItemId, ScoreInfo scoreInfo)
|
public SubmitRoomScoreRequest(long scoreId, long roomId, long playlistItemId, ScoreInfo scoreInfo)
|
||||||
{
|
{
|
||||||
this.scoreId = scoreId;
|
this.scoreId = scoreId;
|
||||||
this.roomId = roomId;
|
this.roomId = roomId;
|
||||||
this.playlistItemId = playlistItemId;
|
this.playlistItemId = playlistItemId;
|
||||||
this.scoreInfo = scoreInfo;
|
score = new SubmittableScore(scoreInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override WebRequest CreateWebRequest()
|
protected override WebRequest CreateWebRequest()
|
||||||
@ -31,7 +32,7 @@ namespace osu.Game.Online.Rooms
|
|||||||
req.ContentType = "application/json";
|
req.ContentType = "application/json";
|
||||||
req.Method = HttpMethod.Put;
|
req.Method = HttpMethod.Put;
|
||||||
|
|
||||||
req.AddRaw(JsonConvert.SerializeObject(scoreInfo, new JsonSerializerSettings
|
req.AddRaw(JsonConvert.SerializeObject(score, new JsonSerializerSettings
|
||||||
{
|
{
|
||||||
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
|
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
|
||||||
}));
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user