From 23dbf04764ab3ada804cdbcdb76800dbaa301775 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Thu, 4 Nov 2021 09:17:51 +0900 Subject: [PATCH 1/2] Fix incorrect type --- .../Difficulty/Preprocessing/OsuDifficultyHitObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/Preprocessing/OsuDifficultyHitObject.cs b/osu.Game.Rulesets.Osu/Difficulty/Preprocessing/OsuDifficultyHitObject.cs index b1de132aa7..d8b176cc29 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/Preprocessing/OsuDifficultyHitObject.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/Preprocessing/OsuDifficultyHitObject.cs @@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing { private const int normalized_radius = 50; // Change radius to 50 to make 100 the diameter. Easier for mental maths. private const int min_delta_time = 25; - private const int minimum_slider_radius = normalized_radius * 2.4; + private const float minimum_slider_radius = normalized_radius * 2.4f; protected new OsuHitObject BaseObject => (OsuHitObject)base.BaseObject; From d76158cbad8142d022f4a71d42f857da2c0e49aa Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Thu, 4 Nov 2021 09:20:46 +0900 Subject: [PATCH 2/2] Resolve inspection --- .../Difficulty/Preprocessing/OsuDifficultyHitObject.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osu.Game.Rulesets.Osu/Difficulty/Preprocessing/OsuDifficultyHitObject.cs b/osu.Game.Rulesets.Osu/Difficulty/Preprocessing/OsuDifficultyHitObject.cs index d8b176cc29..e1b4ee51e1 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/Preprocessing/OsuDifficultyHitObject.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/Preprocessing/OsuDifficultyHitObject.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System; +using System.Diagnostics; using System.Linq; using osu.Game.Rulesets.Difficulty.Preprocessing; using osu.Game.Rulesets.Objects; @@ -108,6 +109,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing if (currSliderObj is SliderEndCircle && !(currSliderObj is SliderRepeat)) { + // Calculated above/ + Debug.Assert(lastSlider.LazyEndPosition != null); + Vector2 lazySlider = Vector2.Subtract((Vector2)lastSlider.LazyEndPosition, currSliderPosition); if (lazySlider.Length < currSlider.Length) currSlider = lazySlider; // Take the least distance from slider end vs lazy end.