Take hitobject start/end times into account in drain

This commit is contained in:
Bartłomiej Dach 2020-05-11 19:06:36 +02:00
parent e650b10b5e
commit 848a3fb6d7
1 changed files with 2 additions and 2 deletions

View File

@ -84,12 +84,12 @@ public override void ApplyBeatmap(IBeatmap beatmap)
noDrainPeriodTracker = new PeriodTracker(beatmap.Breaks.Select(breakPeriod => new Period(
beatmap.HitObjects
.Select(hitObject => hitObject.GetEndTime())
.Where(endTime => endTime < breakPeriod.StartTime)
.Where(endTime => endTime <= breakPeriod.StartTime)
.DefaultIfEmpty(double.MinValue)
.Last(),
beatmap.HitObjects
.Select(hitObject => hitObject.StartTime)
.Where(startTime => startTime > breakPeriod.EndTime)
.Where(startTime => startTime >= breakPeriod.EndTime)
.DefaultIfEmpty(double.MaxValue)
.First()
)));