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

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

View File

@ -84,12 +84,12 @@ namespace osu.Game.Rulesets.Scoring
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()
)));