mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-02-02 13:20:19 +01:00
[worldedge] Don't use globalsteps
This commit is contained in:
parent
91ad1b990d
commit
2d16e24d2d
@ -19,13 +19,7 @@ local waiting_list = {}
|
|||||||
}
|
}
|
||||||
]]
|
]]
|
||||||
|
|
||||||
minetest.register_globalstep(function(dtime)
|
local function tick()
|
||||||
count = count + dtime
|
|
||||||
if count < 3 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
count = 0
|
|
||||||
|
|
||||||
for k, v in pairs(waiting_list) do
|
for k, v in pairs(waiting_list) do
|
||||||
if v.player and v.player:is_player() then
|
if v.player and v.player:is_player() then
|
||||||
local pos = get_surface_pos(v.pos)
|
local pos = get_surface_pos(v.pos)
|
||||||
@ -102,7 +96,9 @@ minetest.register_globalstep(function(dtime)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
minetest.after(3, tick)
|
||||||
|
end
|
||||||
|
tick()
|
||||||
|
|
||||||
function get_surface_pos(pos)
|
function get_surface_pos(pos)
|
||||||
local minp = {
|
local minp = {
|
||||||
|
Loading…
Reference in New Issue
Block a user