mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 00:42:55 +08:00
Merge pull request #3217 from smoogipoo/fix-samples
Fix new control points with same start time not replacing existing ones
This commit is contained in:
commit
da01501a1c
@ -354,6 +354,11 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
private void handleTimingControlPoint(TimingControlPoint newPoint)
|
private void handleTimingControlPoint(TimingControlPoint newPoint)
|
||||||
{
|
{
|
||||||
|
var existing = beatmap.ControlPointInfo.TimingPointAt(newPoint.Time);
|
||||||
|
|
||||||
|
if (existing.Time == newPoint.Time)
|
||||||
|
beatmap.ControlPointInfo.TimingPoints.Remove(existing);
|
||||||
|
|
||||||
beatmap.ControlPointInfo.TimingPoints.Add(newPoint);
|
beatmap.ControlPointInfo.TimingPoints.Add(newPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -364,7 +369,9 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
if (newPoint.EquivalentTo(existing))
|
if (newPoint.EquivalentTo(existing))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
beatmap.ControlPointInfo.DifficultyPoints.RemoveAll(x => x.Time == newPoint.Time);
|
if (existing.Time == newPoint.Time)
|
||||||
|
beatmap.ControlPointInfo.DifficultyPoints.Remove(existing);
|
||||||
|
|
||||||
beatmap.ControlPointInfo.DifficultyPoints.Add(newPoint);
|
beatmap.ControlPointInfo.DifficultyPoints.Add(newPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -375,6 +382,9 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
if (newPoint.EquivalentTo(existing))
|
if (newPoint.EquivalentTo(existing))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (existing.Time == newPoint.Time)
|
||||||
|
beatmap.ControlPointInfo.EffectPoints.Remove(existing);
|
||||||
|
|
||||||
beatmap.ControlPointInfo.EffectPoints.Add(newPoint);
|
beatmap.ControlPointInfo.EffectPoints.Add(newPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,6 +395,9 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
if (newPoint.EquivalentTo(existing))
|
if (newPoint.EquivalentTo(existing))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (existing.Time == newPoint.Time)
|
||||||
|
beatmap.ControlPointInfo.SamplePoints.Remove(existing);
|
||||||
|
|
||||||
beatmap.ControlPointInfo.SamplePoints.Add(newPoint);
|
beatmap.ControlPointInfo.SamplePoints.Add(newPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user