mirror of
https://github.com/ppy/osu.git
synced 2025-02-28 15:55:37 +08:00
Merge pull request #11503 from peppy/revert-beatmap-controlpointinfo-cloning
Revert forced cloning of ControlPointInfo
This commit is contained in:
commit
49aa318b1b
@ -50,15 +50,7 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
IBeatmap IBeatmap.Clone() => Clone();
|
||||
|
||||
public Beatmap<T> Clone()
|
||||
{
|
||||
var clone = (Beatmap<T>)MemberwiseClone();
|
||||
|
||||
clone.ControlPointInfo = ControlPointInfo.CreateCopy();
|
||||
// todo: deep clone other elements as required.
|
||||
|
||||
return clone;
|
||||
}
|
||||
public Beatmap<T> Clone() => (Beatmap<T>)MemberwiseClone();
|
||||
}
|
||||
|
||||
public class Beatmap : Beatmap<HitObject>
|
||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Beatmaps
|
||||
/// <summary>
|
||||
/// The control points in this beatmap.
|
||||
/// </summary>
|
||||
ControlPointInfo ControlPointInfo { get; }
|
||||
ControlPointInfo ControlPointInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The breaks in this beatmap.
|
||||
|
@ -131,6 +131,10 @@ namespace osu.Game.Screens.Edit
|
||||
try
|
||||
{
|
||||
playableBeatmap = Beatmap.Value.GetPlayableBeatmap(Beatmap.Value.BeatmapInfo.Ruleset);
|
||||
|
||||
// clone these locally for now to avoid incurring overhead on GetPlayableBeatmap usages.
|
||||
// eventually we will want to improve how/where this is done as there are issues with *not* cloning it in all cases.
|
||||
playableBeatmap.ControlPointInfo = playableBeatmap.ControlPointInfo.CreateCopy();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -74,7 +74,11 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
public BeatmapMetadata Metadata => PlayableBeatmap.Metadata;
|
||||
|
||||
public ControlPointInfo ControlPointInfo => PlayableBeatmap.ControlPointInfo;
|
||||
public ControlPointInfo ControlPointInfo
|
||||
{
|
||||
get => PlayableBeatmap.ControlPointInfo;
|
||||
set => PlayableBeatmap.ControlPointInfo = value;
|
||||
}
|
||||
|
||||
public List<BreakPeriod> Breaks => PlayableBeatmap.Breaks;
|
||||
|
||||
|
@ -29,7 +29,11 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public BeatmapMetadata Metadata => PlayableBeatmap.Metadata;
|
||||
|
||||
public ControlPointInfo ControlPointInfo => PlayableBeatmap.ControlPointInfo;
|
||||
public ControlPointInfo ControlPointInfo
|
||||
{
|
||||
get => PlayableBeatmap.ControlPointInfo;
|
||||
set => PlayableBeatmap.ControlPointInfo = value;
|
||||
}
|
||||
|
||||
public List<BreakPeriod> Breaks => PlayableBeatmap.Breaks;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user