From e207dd728bb3008dd5453e5ab4471eaf2eccd147 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Thu, 15 Nov 2018 20:26:12 +0900 Subject: [PATCH] Fix taiko proxies not receiving the correct lifetimes --- .../Objects/Drawables/DrawableTaikoHitObject.cs | 8 +++++++- osu.Game/Skinning/SkinnableSound.cs | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableTaikoHitObject.cs b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableTaikoHitObject.cs index 51e39dc648..1dad27dd77 100644 --- a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableTaikoHitObject.cs +++ b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableTaikoHitObject.cs @@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables RelativeSizeAxes = Axes.Both, Child = Content = new Container { RelativeSizeAxes = Axes.Both } }, - proxiedContent = new Container { RelativeSizeAxes = Axes.Both } + proxiedContent = new ProxiedContentContainer { RelativeSizeAxes = Axes.Both } }; } @@ -75,6 +75,12 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables public abstract bool OnPressed(TaikoAction action); public virtual bool OnReleased(TaikoAction action) => false; + + private class ProxiedContentContainer : Container + { + public override double LifetimeStart => Parent.LifetimeStart; + public override double LifetimeEnd => Parent.LifetimeEnd; + } } public abstract class DrawableTaikoHitObject : DrawableTaikoHitObject diff --git a/osu.Game/Skinning/SkinnableSound.cs b/osu.Game/Skinning/SkinnableSound.cs index 2fc9cff463..4f881a917e 100644 --- a/osu.Game/Skinning/SkinnableSound.cs +++ b/osu.Game/Skinning/SkinnableSound.cs @@ -31,6 +31,8 @@ namespace osu.Game.Skinning public void Play() => channels?.ForEach(c => c.Play()); + public override bool IsPresent => false; // We don't need to receive updates. + protected override void SkinChanged(ISkinSource skin, bool allowFallback) { channels = samples.Select(s =>