Add check for nil player for skybox update
This commit is contained in:
parent
7f139f3562
commit
8c0be66f16
|
@ -23,8 +23,12 @@ minetest.register_globalstep(function(dtime)
|
||||||
|
|
||||||
timer = timer + dtime
|
timer = timer + dtime
|
||||||
|
|
||||||
if timer > 5 then
|
if timer > 5 and #players > 0 then
|
||||||
for _, player in ipairs(players) do
|
for _, player in ipairs(players) do
|
||||||
|
if not player then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local player_meta = player:get_meta()
|
local player_meta = player:get_meta()
|
||||||
local player_pos = player:get_pos()
|
local player_pos = player:get_pos()
|
||||||
local biome_data = minetest.get_biome_data(player_pos)
|
local biome_data = minetest.get_biome_data(player_pos)
|
||||||
|
|
Ŝarĝante…
Reference in New Issue