Spawning light check - only check node above when spawn_in_nodes is false

This commit is contained in:
Jordan Leppert 2022-02-15 10:45:50 +00:00
parent cea6d15965
commit d7b880da1e

View file

@ -173,7 +173,11 @@ function execute_spawns(player)
return
end
local light = minetest.get_node_light(vec_raise(spawn_pos, 1)) or 7
local light_pos = spawn_pos
if not spawn.spawn_in_nodes then
light_pos = vec_raise(spawn_pos, 1)
end
local light = minetest.get_node_light(light_pos) or 7
if light > spawn.max_light
or light < spawn.min_light then