Skip to content

Commit

Permalink
Lower minimum move distance to 4 (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
artosimonyan authored Dec 24, 2024
1 parent 85f88cb commit 5e609e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/action/step/move.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 5e609e2

Please sign in to comment.