Handle situation when set_lighting is not available

This commit is contained in:
Dmitry Kostenko 2022-03-18 21:57:08 +01:00
parent 5494fa87c9
commit 51a07a2fb0

View file

@ -110,7 +110,7 @@ local function update_clouds()
), 2),
speed = {x = n_speedx * 4, z = n_speedz * 4},
})
if weather.shadows_enabled then
if weather.shadows_enabled and player.set_lighting ~= nil then
player:set_lighting({shadows = { intensity = 0.5 - density / 2.0} })
end
end