mirror of https://github.com/ppy/osu
Add some more commenting to lifetime calculation
This commit is contained in:
parent
f3fddcc82c
commit
52e3ffff30
|
@ -23,8 +23,10 @@ public void ComputeInitialStates(IEnumerable<DrawableHitObject> hitObjects, Scro
|
|||
{
|
||||
foreach (var obj in hitObjects)
|
||||
{
|
||||
// For optimal lifetimes, the speed of the hitobject is factored into the time range
|
||||
obj.LifetimeStart = obj.HitObject.StartTime - timeRange / controlPointAt(obj.HitObject.StartTime).Multiplier;
|
||||
// The total amount of time that the hitobject will remain visible within the timeRange, which decreases as the speed multiplier increases
|
||||
double visibleDuration = timeRange / controlPointAt(obj.HitObject.StartTime).Multiplier;
|
||||
|
||||
obj.LifetimeStart = obj.HitObject.StartTime - visibleDuration;
|
||||
|
||||
if (obj.HitObject is IHasEndTime endTime)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue