Fix unknown API function call

This commit is contained in:
kay27 2021-07-12 05:39:36 +04:00
parent 79f9837880
commit 34a67e12a9
1 changed files with 5 additions and 1 deletions

View File

@ -500,7 +500,11 @@ function mcl_spawn.shadow_worker()
if success then
local wsp_node = minetest.get_node(wsp)
if wsp_node and (minetest.compare_block_status(wsp, "loaded") or minetest.compare_block_status(wsp, "active"))
if wsp_node and
(
(minetest.compare_block_status and (minetest.compare_block_status(wsp, "loaded") or minetest.compare_block_status(wsp, "active")))
or minetest.get_node_or_nil(wsp)
)
and ((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))