mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Clone and copy ControlPointInfo when retrieving a playable beatmap
This commit is contained in:
@ -11,7 +11,7 @@ using osu.Framework.Lists;
|
||||
namespace osu.Game.Beatmaps.ControlPoints
|
||||
{
|
||||
[Serializable]
|
||||
public class ControlPointInfo
|
||||
public class ControlPointInfo : ICloneable
|
||||
{
|
||||
/// <summary>
|
||||
/// All control points grouped by time.
|
||||
@ -297,5 +297,15 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
var controlPointInfo = new ControlPointInfo();
|
||||
|
||||
foreach (var point in AllControlPoints)
|
||||
controlPointInfo.Add(point.Time, point.CreateCopy());
|
||||
|
||||
return controlPointInfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user