From bd662a876210513e729a863fd1d680905883d064 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Tue, 18 Aug 2015 17:57:17 +0200 Subject: smoother path-following --- pathfinding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit v1.2.3