From 5e609e2efe9464d0f139643499f5fe890767e64c Mon Sep 17 00:00:00 2001 From: Arto Simonyan Date: Tue, 24 Dec 2024 12:58:06 +0200 Subject: [PATCH] Lower minimum move distance to 4 (#604) --- internal/action/step/move.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/action/step/move.go b/internal/action/step/move.go index 6bcdb216..c715dd88 100644 --- a/internal/action/step/move.go +++ b/internal/action/step/move.go @@ -13,7 +13,7 @@ import ( "github.com/hectorgimenez/koolo/internal/utils" ) -const DistanceToFinishMoving = 7 +const DistanceToFinishMoving = 4 func MoveTo(dest data.Position) error { minDistanceToFinishMoving := DistanceToFinishMoving @@ -112,8 +112,8 @@ func MoveTo(dest data.Position) error { } // This is a workaround to avoid the character to get stuck in the same position when the hitbox of the destination is too big - if distance < 20 && math.Abs(float64(previousDistance-distance)) < 5 { - minDistanceToFinishMoving += 5 + if distance < 20 && math.Abs(float64(previousDistance-distance)) < 4 { + minDistanceToFinishMoving += 4 } else { minDistanceToFinishMoving = DistanceToFinishMoving }