mirror of
https://github.com/ppy/osu
synced 2024-12-28 01:42:57 +00:00
Fix control points not being cloned when running beatmap conversion
Closes #20994. I haven't considered how this affects performance of difficulty calculation or otherwise. Seems like a sane initial fix which we can iterate on going forward. I've tested using the scenario in the linked issue. I'm not going to add test coverage because [BeatmapConversionTest](https://github.com/ppy/osu/blob/master/osu.Game/Tests/Beatmaps/BeatmapConversionTest.cs) should correctly cover this scenario once we are serialising control points as well.
This commit is contained in:
parent
17b435db35
commit
978d15955c
@ -47,6 +47,7 @@ namespace osu.Game.Beatmaps
|
||||
// Shallow clone isn't enough to ensure we don't mutate beatmap info unexpectedly.
|
||||
// Can potentially be removed after `Beatmap.Difficulty` doesn't save back to `Beatmap.BeatmapInfo`.
|
||||
original.BeatmapInfo = original.BeatmapInfo.Clone();
|
||||
original.ControlPointInfo = original.ControlPointInfo.DeepClone();
|
||||
|
||||
return ConvertBeatmap(original, cancellationToken);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user