From 7ba5701147bdd7e414cdfb34fc860f12297d8ad7 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Thu, 21 Sep 2023 19:33:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E5=88=B6=E5=90=AF=E5=8A=A8=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E6=9C=80=E5=A4=A7=E5=80=BC=E5=92=8C=E6=9C=80?= =?UTF-8?q?=E5=B0=8F=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows.Interface/Setting.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/VPet-Simulator.Windows.Interface/Setting.cs b/VPet-Simulator.Windows.Interface/Setting.cs index 18e5c49..9976995 100644 --- a/VPet-Simulator.Windows.Interface/Setting.cs +++ b/VPet-Simulator.Windows.Interface/Setting.cs @@ -370,8 +370,8 @@ namespace VPet_Simulator.Windows.Interface set { var line = FindorAddLine("startrecordlast"); - line.SetDouble("x", value.X); - line.SetDouble("y", value.Y); + line.SetDouble("x", Math.Min(Math.Max(value.X, -65000), 65000)); + line.SetDouble("y", Math.Min(Math.Max(value.Y, -65000), 65000)); } } /// @@ -389,8 +389,8 @@ namespace VPet_Simulator.Windows.Interface set { var line = FindorAddLine("startrecord"); - line.SetDouble("x", value.X); - line.SetDouble("y", value.Y); + line.SetDouble("x", Math.Min(Math.Max(value.X, -65000), 65000)); + line.SetDouble("y", Math.Min(Math.Max(value.Y, -65000), 65000)); } } ///