diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModRandom.cs b/osu.Game.Rulesets.Osu/Mods/OsuModRandom.cs index f919ecf839..7794ef8072 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModRandom.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModRandom.cs @@ -70,13 +70,15 @@ public void ApplyToBeatmap(IBeatmap beatmap) // Move hit objects back into the playfield if they are outside of it Vector2 shift = Vector2.Zero; - if (hitObject is HitCircle circle) + switch (hitObject) { - shift = clampHitCircleToPlayfield(circle, current); - } - else if (hitObject is Slider slider) - { - shift = clampSliderToPlayfield(slider, current); + case HitCircle circle: + shift = clampHitCircleToPlayfield(circle, current); + break; + + case Slider slider: + shift = clampSliderToPlayfield(slider, current); + break; } if (shift != Vector2.Zero)