diff --git a/mods/nether/nether/portal.lua b/mods/nether/nether/portal.lua index 33a516c7..2654e179 100755 --- a/mods/nether/nether/portal.lua +++ b/mods/nether/nether/portal.lua @@ -189,15 +189,11 @@ local function update_players() end end -local timer = 0 --doesn't work if the server lags -minetest.register_globalstep(function(dtime) - timer = timer + dtime; - if timer >= 2 then - --minetest.after(1, update_players) - update_players() - timer = 0 - end -end) +local function tick() + update_players() + minetest.after(2, tick) +end +tick() minetest.register_on_joinplayer(function(player) minetest.after(0, function(player)