Clamp LifetimeStart of HitObject's to their judgement windows

This commit is contained in:
sw1tchbl4d3
2022-09-27 16:54:24 +02:00
parent 2a5556de33
commit 0cffbb7562
5 changed files with 9 additions and 5 deletions

View File

@ -3,6 +3,7 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Diagnostics;
using osu.Framework.Allocation;
@ -214,7 +215,10 @@ namespace osu.Game.Rulesets.UI.Scrolling
break;
}
return scrollingInfo.Algorithm.GetDisplayStartTime(hitObject.HitObject.StartTime, originAdjustment, timeRange.Value, scrollLength);
double computedStartTime = scrollingInfo.Algorithm.GetDisplayStartTime(hitObject.HitObject.StartTime, originAdjustment, timeRange.Value, scrollLength);
// always load the hitobject before its first judgement offset
return Math.Min(hitObject.HitObject.StartTime - hitObject.MaximumJudgementOffset, computedStartTime);
}
private void updateLayoutRecursive(DrawableHitObject hitObject)