From 7c40072c4707a9fab3b3bf4c8ce743ddc871e3e7 Mon Sep 17 00:00:00 2001 From: Fabian van Oeffelt Date: Sat, 23 Sep 2023 13:18:49 +0200 Subject: [PATCH 1/2] Get first Spinner,Slider or HitCircle instead of only HitCircle Fixes bug --- osu.Game.Rulesets.Osu/Mods/OsuModBubbles.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModBubbles.cs b/osu.Game.Rulesets.Osu/Mods/OsuModBubbles.cs index b74b722bad..49c6fa65ed 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModBubbles.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModBubbles.cs @@ -61,11 +61,11 @@ namespace osu.Game.Rulesets.Osu.Mods public void ApplyToDrawableRuleset(DrawableRuleset drawableRuleset) { + OsuHitObject firstObject = drawableRuleset.Beatmap.HitObjects.Where(o => o is Spinner || o is Slider || o is HitCircle).First(); // Multiplying by 2 results in an initial size that is too large, hence 1.90 has been chosen // Also avoids the HitObject bleeding around the edges of the bubble drawable at minimum size - bubbleSize = (float)(drawableRuleset.Beatmap.HitObjects.OfType().First().Radius * 1.90f); - bubbleFade = drawableRuleset.Beatmap.HitObjects.OfType().First().TimePreempt * 2; - + bubbleSize = (float)firstObject.Radius * 1.90f; + bubbleFade = firstObject.TimePreempt * 2; // We want to hide the judgements since they are obscured by the BubbleDrawable (due to layering) drawableRuleset.Playfield.DisplayJudgements.Value = false; From 734ee0e68b62ec90c9ebf0d71de460e1211c3235 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sun, 24 Sep 2023 02:22:50 +0300 Subject: [PATCH 2/2] Simplify code --- osu.Game.Rulesets.Osu/Mods/OsuModBubbles.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModBubbles.cs b/osu.Game.Rulesets.Osu/Mods/OsuModBubbles.cs index 49c6fa65ed..9c0e43e96f 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModBubbles.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModBubbles.cs @@ -61,11 +61,13 @@ namespace osu.Game.Rulesets.Osu.Mods public void ApplyToDrawableRuleset(DrawableRuleset drawableRuleset) { - OsuHitObject firstObject = drawableRuleset.Beatmap.HitObjects.Where(o => o is Spinner || o is Slider || o is HitCircle).First(); + OsuHitObject firstObject = drawableRuleset.Beatmap.HitObjects.First(); + // Multiplying by 2 results in an initial size that is too large, hence 1.90 has been chosen // Also avoids the HitObject bleeding around the edges of the bubble drawable at minimum size bubbleSize = (float)firstObject.Radius * 1.90f; bubbleFade = firstObject.TimePreempt * 2; + // We want to hide the judgements since they are obscured by the BubbleDrawable (due to layering) drawableRuleset.Playfield.DisplayJudgements.Value = false;