From 6d7d80a4fbb09f2f89d82bfc3366b71d3d06b259 Mon Sep 17 00:00:00 2001 From: Drison64 Date: Sun, 18 Sep 2022 17:29:08 +0200 Subject: [PATCH] Made X position value of CatchHitObject clamp to CatchPlayfield's width --- osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs b/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs index 6e01c44e1f..c6d63f6b81 100644 --- a/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs +++ b/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs @@ -3,6 +3,7 @@ #nullable disable +using System; using Newtonsoft.Json; using osu.Framework.Bindables; using osu.Game.Beatmaps; @@ -33,7 +34,7 @@ namespace osu.Game.Rulesets.Catch.Objects [JsonIgnore] public float X { - set => originalX.Value = value; + set => originalX.Value = Math.Clamp(value, 0, CatchPlayfield.WIDTH); } private HitObjectProperty xOffset;