mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-23 02:51:06 +01:00
Add time_of_day to get_light crash fix
This commit is contained in:
parent
bcd058feb1
commit
a7e102426a
1 changed files with 2 additions and 2 deletions
|
@ -1029,10 +1029,10 @@ local node_ok = function(pos, fallback)
|
||||||
return minetest.registered_nodes[fallback]
|
return minetest.registered_nodes[fallback]
|
||||||
end
|
end
|
||||||
|
|
||||||
local function get_light(pos)
|
local function get_light(pos, tod)
|
||||||
if math.abs(pos.x) < 31000 and math.abs(pos.y) < 31000 and math.abs(pos.z) < 31000 then
|
if math.abs(pos.x) < 31000 and math.abs(pos.y) < 31000 and math.abs(pos.z) < 31000 then
|
||||||
local lightfunc = minetest.get_natural_light or minetest.get_node_light
|
local lightfunc = minetest.get_natural_light or minetest.get_node_light
|
||||||
return lightfunc(pos)
|
return lightfunc(pos, tod)
|
||||||
else
|
else
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue