Fix error on unknown node
This commit is contained in:
parent
ce39d59356
commit
8ea9af6e23
@ -103,7 +103,7 @@ local function is_good_node(node, exceptions)
|
||||
break
|
||||
end
|
||||
end
|
||||
if not minetest.registered_nodes[node.name].walkable then
|
||||
if node.name ~= nil and not minetest.registered_nodes[node.name].walkable then
|
||||
return pathfinder.node_types.walkable
|
||||
elseif is_openable then
|
||||
return pathfinder.node_types.openable
|
||||
@ -250,4 +250,4 @@ function pathfinder.get_path(map, path_nodes)
|
||||
--print(('Step: %d - x: %d - y: %d'):format(count, node:getX(), node:getY()))
|
||||
end
|
||||
return result
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user