From 7b30fc8a09470611d7d60f17873ae4eae1f5b940 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Wed, 13 Sep 2017 00:43:30 +0900 Subject: [PATCH 1/3] Fix osu! slider initial circles being placed at the wrong depth. --- osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs index 7cb06df679..8cef7de948 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs @@ -65,7 +65,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables Scale = s.Scale, ComboColour = s.ComboColour, Samples = s.Samples, - }), + }) { Depth = 0 }, }; components.Add(body); From 6682c3a73696300925b50296eb68acb39ad79ca8 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Wed, 13 Sep 2017 16:15:11 +0900 Subject: [PATCH 2/3] Override instead of re-binding event --- osu.Game.Rulesets.Catch/UI/CatchPlayfield.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Catch/UI/CatchPlayfield.cs b/osu.Game.Rulesets.Catch/UI/CatchPlayfield.cs index 0dac3ec41c..d946b45372 100644 --- a/osu.Game.Rulesets.Catch/UI/CatchPlayfield.cs +++ b/osu.Game.Rulesets.Catch/UI/CatchPlayfield.cs @@ -49,10 +49,9 @@ namespace osu.Game.Rulesets.Catch.UI var fruit = (DrawableFruit)h; fruit.CheckPosition = catcherArea.CheckIfWeCanCatch; - fruit.OnJudgement += Fruit_OnJudgement; } - private void Fruit_OnJudgement(DrawableHitObject judgedObject, Judgement judgement) + public override void OnJudgement(DrawableHitObject judgedObject, Judgement judgement) { if (judgement.IsHit) { From 093d82ac45c245da6ab6b0b39eed292eb9d4a027 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Wed, 13 Sep 2017 16:17:01 +0900 Subject: [PATCH 3/3] Set depths from playfield add methods instead of DrawableHitObject --- osu.Game.Rulesets.Catch/UI/CatchPlayfield.cs | 2 ++ osu.Game.Rulesets.Mania/UI/Column.cs | 2 ++ osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs | 2 +- osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs | 2 ++ osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs | 2 ++ osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs | 2 -- 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Catch/UI/CatchPlayfield.cs b/osu.Game.Rulesets.Catch/UI/CatchPlayfield.cs index d946b45372..2b6f9bbf5a 100644 --- a/osu.Game.Rulesets.Catch/UI/CatchPlayfield.cs +++ b/osu.Game.Rulesets.Catch/UI/CatchPlayfield.cs @@ -45,6 +45,8 @@ namespace osu.Game.Rulesets.Catch.UI public override void Add(DrawableHitObject h) { + h.Depth = (float)h.HitObject.StartTime; + base.Add(h); var fruit = (DrawableFruit)h; diff --git a/osu.Game.Rulesets.Mania/UI/Column.cs b/osu.Game.Rulesets.Mania/UI/Column.cs index 1133c9f2ee..2d553f8639 100644 --- a/osu.Game.Rulesets.Mania/UI/Column.cs +++ b/osu.Game.Rulesets.Mania/UI/Column.cs @@ -203,6 +203,8 @@ namespace osu.Game.Rulesets.Mania.UI /// The DrawableHitObject to add. public override void Add(DrawableHitObject hitObject) { + hitObject.Depth = (float)hitObject.HitObject.StartTime; + hitObject.AccentColour = AccentColour; HitObjects.Add(hitObject); } diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs index 8cef7de948..c5155d1e10 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs @@ -65,7 +65,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables Scale = s.Scale, ComboColour = s.ComboColour, Samples = s.Samples, - }) { Depth = 0 }, + }) }; components.Add(body); diff --git a/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs b/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs index 17f4f9f541..1bb4e8493b 100644 --- a/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs +++ b/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs @@ -70,6 +70,8 @@ namespace osu.Game.Rulesets.Osu.UI public override void Add(DrawableHitObject h) { + h.Depth = (float)h.HitObject.StartTime; + var c = h as IDrawableHitObjectWithProxiedApproach; if (c != null) approachCircles.Add(c.ProxiedLayer.CreateProxy()); diff --git a/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs b/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs index 2dd06f7179..d9a216bbfc 100644 --- a/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs +++ b/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs @@ -205,6 +205,8 @@ namespace osu.Game.Rulesets.Taiko.UI public override void Add(DrawableHitObject h) { + h.Depth = (float)h.HitObject.StartTime; + base.Add(h); var barline = h as DrawableBarLine; diff --git a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs index 7cf098c3fa..7a26a53c2a 100644 --- a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs +++ b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs @@ -55,8 +55,6 @@ namespace osu.Game.Rulesets.Objects.Drawables : base(hitObject) { HitObject = hitObject; - - Depth = (float)hitObject.StartTime; } private ArmedState state;