1
0
Fork 0

Add time_of_day to get_light crash fix

production
Elias Fleckenstein 2021-04-17 21:01:09 +02:00
parent 409e48f068
commit 90a54104e8
1 changed files with 2 additions and 2 deletions

View File

@ -1029,10 +1029,10 @@ local node_ok = function(pos, fallback)
return minetest.registered_nodes[fallback]
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
local lightfunc = minetest.get_natural_light or minetest.get_node_light
return lightfunc(pos)
return lightfunc(pos, tod)
else
return 0
end