mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-04-30 05:41:46 -04:00
Spawning light check - only check node above when spawn_in_nodes is false
This commit is contained in:
parent
cea6d15965
commit
d7b880da1e
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue