mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Add inline comment explaining LifetimeEnd
set for future visitors
This commit is contained in:
parent
d52dffefbc
commit
a3960bf715
@ -240,6 +240,13 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
|||||||
|
|
||||||
// always load the hitobject before its first judgement offset
|
// always load the hitobject before its first judgement offset
|
||||||
entry.LifetimeStart = Math.Min(entry.HitObject.StartTime - entry.HitObject.MaximumJudgementOffset, computedStartTime);
|
entry.LifetimeStart = Math.Min(entry.HitObject.StartTime - entry.HitObject.MaximumJudgementOffset, computedStartTime);
|
||||||
|
|
||||||
|
// This is likely not entirely correct, but sets a sane expectation of the ending lifetime.
|
||||||
|
// A more correct lifetime will be overwritten after a DrawableHitObject is assigned via DrawableHitObject.updateState.
|
||||||
|
//
|
||||||
|
// It is required that we set a lifetime end here to ensure that in scenarios like loading a Player instance to a seeked
|
||||||
|
// location in a beatmap doesn't churn every hit object into a DrawableHitObject. Even in a pooled scenario, the overhead
|
||||||
|
// of this can be quite crippling.
|
||||||
entry.LifetimeEnd = entry.HitObject.GetEndTime() + timeRange.Value;
|
entry.LifetimeEnd = entry.HitObject.GetEndTime() + timeRange.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user