1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:47:29 +08:00

Copy score during submission process to ensure it isn't modified

This commit is contained in:
Dean Herbert 2021-07-19 13:04:16 +09:00
parent e507faef29
commit caba78cb5d

View File

@ -38,13 +38,15 @@ namespace osu.Game.Screens.Play
protected override APIRequest<MultiplayerScore> CreateSubmissionRequest(Score score, long token)
{
var beatmap = score.ScoreInfo.Beatmap;
var scoreCopy = score.DeepClone();
var beatmap = scoreCopy.ScoreInfo.Beatmap;
Debug.Assert(beatmap.OnlineBeatmapID != null);
int beatmapId = beatmap.OnlineBeatmapID.Value;
return new SubmitSoloScoreRequest(beatmapId, token, score.ScoreInfo);
return new SubmitSoloScoreRequest(beatmapId, token, scoreCopy.ScoreInfo);
}
}
}