Use GetLastObjectTime() for safety

Due to other circumstances this has no real effect, but may as well.
This commit is contained in:
Bartłomiej Dach 2024-06-27 07:48:05 +02:00
parent 981340debe
commit ef952bcd65
No known key found for this signature in database

View File

@ -41,7 +41,7 @@ namespace osu.Game.Screens.Edit
foreach (var manualBreak in Beatmap.Breaks.ToList())
{
if (manualBreak.EndTime <= Beatmap.HitObjects.FirstOrDefault()?.StartTime
|| manualBreak.StartTime >= Beatmap.HitObjects.LastOrDefault()?.GetEndTime()
|| manualBreak.StartTime >= Beatmap.GetLastObjectTime()
|| Beatmap.HitObjects.Any(ho => ho.StartTime <= manualBreak.EndTime && ho.GetEndTime() >= manualBreak.StartTime))
{
Beatmap.Breaks.Remove(manualBreak);