diff --git a/osu.Game/Screens/Edit/LegacyEditorBeatmapPatcher.cs b/osu.Game/Screens/Edit/LegacyEditorBeatmapPatcher.cs index c668778be2e8..16f65335751c 100644 --- a/osu.Game/Screens/Edit/LegacyEditorBeatmapPatcher.cs +++ b/osu.Game/Screens/Edit/LegacyEditorBeatmapPatcher.cs @@ -12,6 +12,7 @@ using osu.Framework.Graphics.Textures; using osu.Game.Beatmaps; using osu.Game.Beatmaps.Formats; +using osu.Game.Beatmaps.Legacy; using osu.Game.IO; using osu.Game.Skinning; using Decoder = osu.Game.Beatmaps.Formats.Decoder; @@ -51,12 +52,16 @@ private void processTimingPoints(DiffResult result, Func getNewBeatmap // Due to conversion from legacy to non-legacy control points, it becomes difficult to diff control points correctly. // So instead _all_ control points are reloaded if _any_ control point is changed. - - var newControlPoints = EditorBeatmap.ConvertControlPoints(getNewBeatmap().ControlPointInfo); + LegacyControlPointInfo legacyControlPoints = (LegacyControlPointInfo)getNewBeatmap().ControlPointInfo; editorBeatmap.ControlPointInfo.Clear(); - foreach (var point in newControlPoints.AllControlPoints) + foreach (var point in EditorBeatmap.ConvertControlPoints(legacyControlPoints).AllControlPoints) editorBeatmap.ControlPointInfo.Add(point.Time, point); + + // We need to update the existing difficulty/sample control points in hitobjects. + // Note: EditorBeatmap.UpdateAllHitObjects() can't be used since it uses a non-legacy ControlPointInfo. + foreach (var obj in editorBeatmap.HitObjects) + obj.ApplyDefaults(legacyControlPoints, editorBeatmap.Difficulty); } private void processHitObjects(DiffResult result, Func getNewBeatmap)