From fe7e03f7566ee19cdc40810c3acd2d0a62b6f4ad Mon Sep 17 00:00:00 2001 From: Debug_pro Date: Thu, 26 Feb 2026 01:46:31 +0300 Subject: [PATCH] fix move speed --- .../TerrainPointSunPointHumanPointText.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/DrawFigureLibrary/TerrainPointSunPointHumanPointText.cs b/DrawFigureLibrary/TerrainPointSunPointHumanPointText.cs index e2971b3..5956910 100644 --- a/DrawFigureLibrary/TerrainPointSunPointHumanPointText.cs +++ b/DrawFigureLibrary/TerrainPointSunPointHumanPointText.cs @@ -120,6 +120,9 @@ namespace DrawFigureLibrary double scaleX = w / ReferenceWidth; double scaleY = h / ReferenceHeight; + int refDx = (int)(deltaX / scaleX); + int refDy = (int)(deltaY / scaleY); + var bbox = GetPersonBoundingBox(scaleX, scaleY, _humanDx + deltaX, _humanDy + deltaY); double maxW = Init.DrawingImage.ActualWidth; @@ -130,8 +133,8 @@ namespace DrawFigureLibrary bbox.Right <= maxW && bbox.Bottom <= maxH) { - _humanDx += deltaX; - _humanDy += deltaY; + _humanDx += refDx; + _humanDy += refDy; } } @@ -440,6 +443,9 @@ namespace DrawFigureLibrary double scaleX = w / ReferenceWidth; double scaleY = h / ReferenceHeight; + int refDx = (int)(deltaX / scaleX); + int refDy = (int)(deltaY / scaleY); + var bbox = GetPersonBoundingBox(scaleX, scaleY, _humanDx + deltaX, _humanDy + deltaY); double maxW = Init.DrawingImage.ActualWidth; @@ -450,8 +456,8 @@ namespace DrawFigureLibrary bbox.Right <= maxW && bbox.Bottom <= maxH) { - _humanDx += deltaX; - _humanDy += deltaY; + _humanDx += refDx; + _humanDy += refDy; return true; }