From 99831beb400a71abd73b9d67e92a85e04c45d9a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E4=BA=91?= Date: Mon, 6 Jan 2025 11:51:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=9A=84=E6=97=B6=E5=80=99=E7=8B=82=E7=82=B9?= =?UTF-8?q?=E6=A0=87=E8=AE=B0=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BA=86=E7=A7=BB=E5=8A=A8=E6=AC=A1=E6=95=B0=E4=BB=8E0?= =?UTF-8?q?=E5=BC=80=E5=A7=8B=E8=AE=A1=E7=AE=97=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs b/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs index 31712f0a..29e89f43 100644 --- a/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs +++ b/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs @@ -256,7 +256,7 @@ public class TpTask(CancellationToken ct) // https://github.com/babalae/better-genshin-impact/issues/318 if (mouseDistance < tolerance && currentZoomLevel < 2.5) { - Logger.LogInformation($"移动 {iteration} 次鼠标后,已经接近目标点,不再进一步调整。"); + Logger.LogInformation("移动 {I} 次鼠标后,已经接近目标点,不再进一步调整。", iteration + 1); break; } while (mouseDistance > 5 * tolerance && currentZoomLevel < 4) @@ -274,6 +274,11 @@ public class TpTask(CancellationToken ct) totalMoveMouseY *= (currentZoomLevel) / (currentZoomLevel - 1); mouseDistance *= (currentZoomLevel) / (currentZoomLevel - 1); currentZoomLevel--; + if (mouseDistance < tolerance && currentZoomLevel < 2.5) + { + Logger.LogInformation("移动 {I} 次鼠标后,已经接近目标点,不再进一步调整。", iteration + 1); + break; + } } // 单次移动最大距离为 maxMouseMove