mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-29 14:01:07 +01:00
[mcl_spawn] Ignore 'ignore' nodes when checking the point, fix https://git.minetest.land/MineClone2/MineClone2/issues/1230
This commit is contained in:
parent
b587b1f2a5
commit
2e3a5efaf9
1 changed files with 11 additions and 4 deletions
|
@ -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 a new issue