mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 14:12:56 +08:00
Simplify copy operations
This commit is contained in:
parent
9fae2c350d
commit
015df282fe
@ -21,7 +21,7 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
|
||||
beatmap.BeatmapInfo.BeatDivisor = 1;
|
||||
|
||||
beatmap.ControlPointInfo = new ControlPointInfo();
|
||||
beatmap.ControlPointInfo.Clear();
|
||||
beatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = 1000 });
|
||||
beatmap.ControlPointInfo.Add(2000, new TimingControlPoint { BeatLength = 500 });
|
||||
|
||||
|
@ -401,15 +401,8 @@ namespace osu.Game.Beatmaps.Formats
|
||||
private readonly HashSet<Type> pendingControlPointTypes = new HashSet<Type>();
|
||||
private double pendingControlPointsTime;
|
||||
|
||||
private readonly LegacyControlPointInfo controlPointInfo = new LegacyControlPointInfo();
|
||||
|
||||
private void addControlPoint(double time, ControlPoint point, bool timingChange)
|
||||
{
|
||||
if (point is SampleControlPoint)
|
||||
{
|
||||
controlPointInfo.Add(time, point);
|
||||
}
|
||||
|
||||
if (time != pendingControlPointsTime)
|
||||
flushPendingPoints();
|
||||
|
||||
@ -447,9 +440,7 @@ namespace osu.Game.Beatmaps.Formats
|
||||
|
||||
if (obj != null)
|
||||
{
|
||||
// assign legacy control points directly to hitobject
|
||||
//obj.SampleControlPoint = controlPointInfo.SamplePointAt(obj.StartTime);
|
||||
obj.ApplyDefaults(controlPointInfo, beatmap.BeatmapInfo.BaseDifficulty);
|
||||
obj.ApplyDefaults(beatmap.ControlPointInfo, beatmap.BeatmapInfo.BaseDifficulty);
|
||||
|
||||
beatmap.HitObjects.Add(obj);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user