summaryrefslogtreecommitdiff
path: root/pathfinding.py
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2015-08-18 17:57:17 +0200
committerFlorian Jung <flo@windfisch.org>2015-08-18 17:57:17 +0200
commitbd662a876210513e729a863fd1d680905883d064 (patch)
tree3987f6eb14f9832a5bf7c627091d9c391034b6fd /pathfinding.py
parentb5655690e849b2605a7e092a26f05b6d0dd4a313 (diff)
smoother path-following
Diffstat (limited to 'pathfinding.py')
-rw-r--r--pathfinding.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pathfinding.py b/pathfinding.py
index 076213c..b250523 100644
--- a/pathfinding.py
+++ b/pathfinding.py
@@ -121,7 +121,7 @@ class PathfindingTesterStrategy:
if self.path:
relx, rely = self.path[0].point[0]-self.c.player.center.x, self.path[0].point[1]-self.c.player.center.y
- if relx*relx + rely*rely < 10**2:
+ if relx*relx + rely*rely < (2*grid_density)**2:
self.path=self.path[1:]
if self.path: