mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-03-11 06:07:44 +01:00
Tiny fix in door pathfinding (#4893)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4893 Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land> Co-authored-by: kno10 <erich.schubert@gmail.com> Co-committed-by: kno10 <erich.schubert@gmail.com>
This commit is contained in:
parent
94a0a0c008
commit
a0fe68a6f1
1 changed files with 2 additions and 2 deletions
|
@ -120,8 +120,8 @@ local function calculate_path_through_door (p, cur_door_pos, t)
|
|||
|
||||
for _,v in pairs(plane_adjacents) do
|
||||
local pos_closest_to_door = vector.add(cur_door_pos,v)
|
||||
local n = minetest.get_node(pos_closest_to_door)
|
||||
if not n.walkable then
|
||||
local ndef = minetest.registered_nodes[minetest.get_node(pos_closest_to_door).name]
|
||||
if not ndef.walkable then
|
||||
mcl_log("We have open space next to door at: " .. minetest.pos_to_string(pos_closest_to_door))
|
||||
|
||||
local prospective_wp = minetest.find_path(p, pos_closest_to_door, PATHFINDING_SEARCH_DISTANCE, 1, 4)
|
||||
|
|
Loading…
Reference in a new issue