1
0
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:
Dean Herbert 2021-08-30 18:32:55 +09:00
parent 9fae2c350d
commit 015df282fe
2 changed files with 2 additions and 11 deletions

View File

@ -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 });

View File

@ -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);
}