Add check for nil player for skybox update
This commit is contained in:
parent
8c0be66f16
commit
4362112b8c
|
@ -19,11 +19,10 @@
|
||||||
local timer = 0
|
local timer = 0
|
||||||
|
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
|
timer = timer + dtime
|
||||||
|
if timer > 5 then
|
||||||
local players = minetest.get_connected_players()
|
local players = minetest.get_connected_players()
|
||||||
|
|
||||||
timer = timer + dtime
|
|
||||||
|
|
||||||
if timer > 5 and #players > 0 then
|
|
||||||
for _, player in ipairs(players) do
|
for _, player in ipairs(players) do
|
||||||
if not player then
|
if not player then
|
||||||
return
|
return
|
||||||
|
|
Ŝarĝante…
Reference in New Issue