mirror of https://github.com/ppy/osu
Purge manual breaks if they intersect with an actual hitobject
This commit is contained in:
parent
7ed587b783
commit
7311a7ffd7
|
@ -38,6 +38,12 @@ private void autoGenerateBreaks()
|
|||
{
|
||||
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();
|
||||
|
|
Loading…
Reference in New Issue