1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-14 05:47:20 +08:00

Fix mods potentially keeping reference to runtime gameplay elements

As noticed by smoogipoo during multiplayer match on the weekend.
This commit is contained in:
Dean Herbert 2022-09-18 23:48:03 +09:00
parent 454125123d
commit 0a625bd879

View File

@ -137,6 +137,11 @@ namespace osu.Game.Scoring
clone.Statistics = new Dictionary<HitResult, int>(clone.Statistics);
clone.MaximumStatistics = new Dictionary<HitResult, int>(clone.MaximumStatistics);
// Ensure we have fresh mods to avoid any references (ie. after gameplay).
clone.clearAllMods();
clone.ModsJson = ModsJson;
clone.RealmUser = new RealmUser
{
OnlineID = RealmUser.OnlineID,