mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 13:32:54 +08:00
Fix lifetime performance regression.
This commit is contained in:
parent
b1d25ed388
commit
e1dfe364b2
@ -22,20 +22,22 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
{
|
||||
}
|
||||
|
||||
private double? lifetimeStart;
|
||||
public override double LifetimeStart
|
||||
{
|
||||
get { return Math.Min(HitObject.StartTime - LifetimeOffset, base.LifetimeStart); }
|
||||
set { base.LifetimeStart = value; }
|
||||
get { return lifetimeStart ?? HitObject.StartTime - LifetimeOffset; }
|
||||
set { lifetimeStart = value; }
|
||||
}
|
||||
|
||||
private double? lifetimeEnd;
|
||||
public override double LifetimeEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
var endTime = (HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime;
|
||||
return Math.Max(endTime + LifetimeOffset, base.LifetimeEnd);
|
||||
return lifetimeEnd ?? endTime + LifetimeOffset;
|
||||
}
|
||||
set { base.LifetimeEnd = value; }
|
||||
set { lifetimeEnd = value; }
|
||||
}
|
||||
|
||||
protected override void AddNested(DrawableHitObject<TObject, TJudgement> h)
|
||||
|
Loading…
Reference in New Issue
Block a user