1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 14:32:55 +08:00

Purge manual breaks if they intersect with an actual hitobject

This commit is contained in:
Bartłomiej Dach 2024-06-19 10:51:37 +02:00
parent 7ed587b783
commit 7311a7ffd7
No known key found for this signature in database

View File

@ -38,6 +38,12 @@ namespace osu.Game.Screens.Edit
{
Beatmap.Breaks.RemoveAll(b => b is not ManualBreakPeriod);
foreach (var manualBreak in Beatmap.Breaks.ToList())
{
if (Beatmap.HitObjects.Any(ho => ho.StartTime <= manualBreak.EndTime && ho.GetEndTime() >= manualBreak.StartTime))
Beatmap.Breaks.Remove(manualBreak);
}
for (int i = 1; i < Beatmap.HitObjects.Count; ++i)
{
double previousObjectEndTime = Beatmap.HitObjects[i - 1].GetEndTime();