mirror of
https://github.com/osukey/osukey.git
synced 2025-04-29 02:37:25 +09: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.
|
// 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`.
|
// Can potentially be removed after `Beatmap.Difficulty` doesn't save back to `Beatmap.BeatmapInfo`.
|
||||||
original.BeatmapInfo = original.BeatmapInfo.Clone();
|
original.BeatmapInfo = original.BeatmapInfo.Clone();
|
||||||
|
original.ControlPointInfo = original.ControlPointInfo.DeepClone();
|
||||||
|
|
||||||
return ConvertBeatmap(original, cancellationToken);
|
return ConvertBeatmap(original, cancellationToken);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user