From 2a018e708de0879934c118cef37130923cc9a00b Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Wed, 29 Mar 2017 09:36:07 +0900 Subject: [PATCH] Better life time end. --- .../Objects/Drawable/DrawableDrumRoll.cs | 11 +++++++++++ .../Objects/Drawable/DrawableTaikoHitObject.cs | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs index 7915599c3e..b599fea57d 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs @@ -35,6 +35,17 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable } } + protected override void LoadComplete() + { + base.LoadComplete(); + + // This is naive, however it's based on the reasoning that the hit target + // is further than mid point of the play field, so the time taken to scroll in should always + // be greater than the time taken to scroll out to the left of the screen. + // Thus, using PreEmpt here is enough for the drum roll to completely scroll out. + LifetimeEnd = drumRoll.EndTime + drumRoll.PreEmpt; + } + protected override void CheckJudgement(bool userTriggered) { if (userTriggered) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHitObject.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHitObject.cs index 609fac70ea..8da05d8bed 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHitObject.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHitObject.cs @@ -30,7 +30,6 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable protected override void LoadComplete() { LifetimeStart = HitObject.StartTime - HitObject.PreEmpt * 2; - LifetimeEnd = HitObject.StartTime + HitObject.PreEmpt; base.LoadComplete(); }