Pathfinder: Fix indentation.

Improve path decorator to avoid jumping NPCs (in Minetest 0.5-dev)
This commit is contained in:
Hector Franqui 2017-09-13 09:09:08 -04:00
parent 70fd62825c
commit 866b25c63c
1 changed files with 131 additions and 130 deletions

View File

@ -63,7 +63,8 @@ function pathfinder.get_decorated_path(path)
local path_detail = {}
for i = 1, #path do
local node = minetest.get_node(path[i])
table.insert(path_detail, {pos=path[i], type=pathfinder.is_good_node(node, {})})
table.insert(path_detail, {pos={x=path[i].x, y=path[i].y-0.5, z=path[i].z},
type=pathfinder.is_good_node(node, {})})
end
npc.log("DEBUG", "Detailed path: "..dump(path_detail))