From dcab6ab8834386a68f35d1f4e62cc90969938c5b Mon Sep 17 00:00:00 2001 From: zealain Date: Mon, 27 Mar 2023 21:47:41 +0200 Subject: [PATCH] Improved code for grow/deflate slide scale option --- .../Mods/OsuModObjectScaleTween.cs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModObjectScaleTween.cs b/osu.Game.Rulesets.Osu/Mods/OsuModObjectScaleTween.cs index 5df9cb662c..ab90ce0a51 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModObjectScaleTween.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModObjectScaleTween.cs @@ -45,12 +45,20 @@ namespace osu.Game.Rulesets.Osu.Mods var h = (OsuHitObject)drawable.HitObject; // apply grow effect - if ((drawable is DrawableSlider && ScaleSliders.Value) - || (drawable is DrawableSliderHead && !ScaleSliders.Value) - || drawable is DrawableHitCircle) + switch (drawable) { - using (drawable.BeginAbsoluteSequence(h.StartTime - h.TimePreempt)) - drawable.ScaleTo(StartScale.Value).Then().ScaleTo(EndScale, h.TimePreempt, Easing.OutSine); + case DrawableSliderTail: + // special case we should *not* be scaling. + break; + + case DrawableSlider when ScaleSliders.Value: + case DrawableSliderHead when !ScaleSliders.Value: + case DrawableHitCircle: + { + using (drawable.BeginAbsoluteSequence(h.StartTime - h.TimePreempt)) + drawable.ScaleTo(StartScale.Value).Then().ScaleTo(EndScale, h.TimePreempt, Easing.OutSine); + break; + } } // remove approach circles