mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-26 09:59:33 +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,10 +497,17 @@ function mcl_spawn.shadow_worker()
|
|||
mcl_spawn.search()
|
||||
minetest.log("action", "[mcl_spawn] Started world spawn point search")
|
||||
end
|
||||
if success and ((not good_for_respawn(wsp)) or (not can_find_tree(wsp))) then
|
||||
success = false
|
||||
minetest.log("action", "[mcl_spawn] World spawn position isn't safe anymore: "..minetest.pos_to_string(wsp))
|
||||
mcl_spawn.search()
|
||||
|
||||
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
|
||||
minetest.log("action", "[mcl_spawn] World spawn position isn't safe anymore: "..minetest.pos_to_string(wsp))
|
||||
mcl_spawn.search()
|
||||
end
|
||||
end
|
||||
|
||||
minetest.after(respawn_search_interval, mcl_spawn.shadow_worker)
|
||||
|
|
Loading…
Reference in a new issue