Pathfinder: Fix indentation.
Improve path decorator to avoid jumping NPCs (in Minetest 0.5-dev)
This commit is contained in:
parent
70fd62825c
commit
866b25c63c
@ -63,7 +63,8 @@ function pathfinder.get_decorated_path(path)
|
|||||||
local path_detail = {}
|
local path_detail = {}
|
||||||
for i = 1, #path do
|
for i = 1, #path do
|
||||||
local node = minetest.get_node(path[i])
|
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
|
end
|
||||||
|
|
||||||
npc.log("DEBUG", "Detailed path: "..dump(path_detail))
|
npc.log("DEBUG", "Detailed path: "..dump(path_detail))
|
||||||
|
Loading…
Reference in New Issue
Block a user