* Fix crash when minetest.get_node_light() returns nil

This commit is contained in:
Nils Dagsson Moskopp 2023-11-08 19:56:45 +01:00
parent f3ac2bde3e
commit dbf260c48d
Signed by: erle
GPG Key ID: A3BC671C35191080
1 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,8 @@ local get_node_color = function( node )
end
local get_light = function( position )
return minetest.get_node_light( position ) / 16
local node_light = minetest.get_node_light( position )
return node_light and node_light / 16 or 0
end
local get_fog = function( distance )