Tighten osu! ruleset lifetime expiry for past hitobjects

This commit is contained in:
smoogipoo
2020-11-17 23:19:59 +09:00
parent bcf6974e18
commit 04805b78c3
4 changed files with 16 additions and 9 deletions

View File

@ -11,6 +11,7 @@ using osu.Game.Rulesets.Osu.Judgements;
using osu.Game.Graphics.Containers;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Osu.UI;
using osu.Game.Rulesets.Scoring;
using osuTK;
namespace osu.Game.Rulesets.Osu.Objects.Drawables
@ -91,6 +92,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
// Manually set to reduce the number of future alive objects to a bare minimum.
LifetimeStart = HitObject.StartTime - HitObject.TimePreempt;
// Arbitrary lifetime end to prevent past objects in idle states remaining alive in non-frame-stable contexts.
// An extra 1000ms is added to always overestimate the true lifetime, and a more exact value is set by hit transforms and the following expiry.
LifetimeEnd = HitObject.GetEndTime() + HitObject.HitWindows.WindowFor(HitResult.Miss) + 1000;
}
/// <summary>