1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-17 01:32:55 +08:00

Merge pull request #29966 from bdach/unsafe-deep-clone

Fix score being cloned in async method causing random errors (again)
This commit is contained in:
Dean Herbert 2024-09-23 23:37:46 +09:00 committed by GitHub
commit f08134f443
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -234,9 +234,12 @@ namespace osu.Game.Screens.Play
{
if (LoadedBeatmapSuccessfully)
{
// compare: https://github.com/ppy/osu/blob/ccf1acce56798497edfaf92d3ece933469edcf0a/osu.Game/Screens/Play/Player.cs#L848-L851
var scoreCopy = Score.DeepClone();
Task.Run(async () =>
{
await submitScore(Score.DeepClone()).ConfigureAwait(false);
await submitScore(scoreCopy).ConfigureAwait(false);
spectatorClient.EndPlaying(GameplayState);
}).FireAndForget();
}