[mcl_spawn] Ignore 'ignore' nodes when checking the point, fix https://git.minetest.land/MineClone2/MineClone2/issues/1230
parent
b587b1f2a5
commit
2e3a5efaf9
|
@ -497,11 +497,18 @@ function mcl_spawn.shadow_worker()
|
||||||
mcl_spawn.search()
|
mcl_spawn.search()
|
||||||
minetest.log("action", "[mcl_spawn] Started world spawn point search")
|
minetest.log("action", "[mcl_spawn] Started world spawn point search")
|
||||||
end
|
end
|
||||||
if success and ((not good_for_respawn(wsp)) or (not can_find_tree(wsp))) then
|
|
||||||
|
if success then
|
||||||
|
local wsp_node = minetest.get_node(wsp)
|
||||||
|
if wsp_node and wsp_node.name == "ignore" then
|
||||||
|
-- special case - respawn area unloaded from memory - it's okay, skip for now
|
||||||
|
|
||||||
|
elseif ((not good_for_respawn(wsp)) or ((no_trees_area_counter >= 0) and not can_find_tree(wsp))) then
|
||||||
success = false
|
success = false
|
||||||
minetest.log("action", "[mcl_spawn] World spawn position isn't safe anymore: "..minetest.pos_to_string(wsp))
|
minetest.log("action", "[mcl_spawn] World spawn position isn't safe anymore: "..minetest.pos_to_string(wsp))
|
||||||
mcl_spawn.search()
|
mcl_spawn.search()
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
minetest.after(respawn_search_interval, mcl_spawn.shadow_worker)
|
minetest.after(respawn_search_interval, mcl_spawn.shadow_worker)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue