From 2231f93552a58111a7ecdcbb32df359b417db7e0 Mon Sep 17 00:00:00 2001 From: Leibosite <997932686@qq.com> Date: Thu, 30 May 2019 16:07:34 +0800 Subject: [PATCH] fix smooth_paht error bug at 126 line ,it should be blocked, --- pathfinding/core/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pathfinding/core/util.py b/pathfinding/core/util.py index b2244cb..46be397 100644 --- a/pathfinding/core/util.py +++ b/pathfinding/core/util.py @@ -123,7 +123,7 @@ def smoothen_path(grid, path, use_raytrace=False): if not grid.walkable(test_coord[0], test_coord[1]): blocked = True break - if not blocked: + if blocked: new_path.append(last_valid) sx, sy = last_valid last_valid = coord