From bf9f20705f06e3094ae7e772f4ac59fa45472856 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 2 Nov 2023 17:39:23 +0900 Subject: [PATCH] Simplify classic behaviour flag to only need to be specified on the slider itself --- osu.Game.Rulesets.Osu/Mods/OsuModClassic.cs | 4 ---- osu.Game.Rulesets.Osu/Objects/Slider.cs | 14 +++++++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModClassic.cs b/osu.Game.Rulesets.Osu/Mods/OsuModClassic.cs index c668119db7..f20f95b384 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModClassic.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModClassic.cs @@ -42,10 +42,6 @@ namespace osu.Game.Rulesets.Osu.Mods { case Slider slider: slider.ClassicSliderBehaviour = NoSliderHeadAccuracy.Value; - - foreach (var head in slider.NestedHitObjects.OfType()) - head.ClassicSliderBehaviour = NoSliderHeadAccuracy.Value; - break; } } diff --git a/osu.Game.Rulesets.Osu/Objects/Slider.cs b/osu.Game.Rulesets.Osu/Objects/Slider.cs index 0859a6fe17..50791183f5 100644 --- a/osu.Game.Rulesets.Osu/Objects/Slider.cs +++ b/osu.Game.Rulesets.Osu/Objects/Slider.cs @@ -127,7 +127,18 @@ namespace osu.Game.Rulesets.Osu.Objects /// Whether this 's judgement is fully handled by its nested s. /// If false, this will be judged proportionally to the number of nested s hit. /// - public bool ClassicSliderBehaviour = false; + public bool ClassicSliderBehaviour + { + get => classicSliderBehaviour; + set + { + classicSliderBehaviour = value; + if (HeadCircle != null) + HeadCircle.ClassicSliderBehaviour = value; + } + } + + private bool classicSliderBehaviour; public BindableNumber SliderVelocityMultiplierBindable { get; } = new BindableDouble(1) { @@ -196,6 +207,7 @@ namespace osu.Game.Rulesets.Osu.Objects StartTime = e.Time, Position = Position, StackHeight = StackHeight, + ClassicSliderBehaviour = ClassicSliderBehaviour, }); break;