mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 17:50:37 +01:00
[areas] Reduce HUD tick rate to 1s
This commit is contained in:
parent
ca056b9920
commit
f112012747
@ -2,7 +2,8 @@
|
||||
|
||||
areas.hud = {}
|
||||
|
||||
minetest.register_globalstep(function(dtime)
|
||||
local function tick()
|
||||
minetest.after(1, tick)
|
||||
for _, player in pairs(minetest.get_connected_players()) do
|
||||
local name = player:get_player_name()
|
||||
local pos = vector.round(player:getpos())
|
||||
@ -38,7 +39,9 @@ minetest.register_globalstep(function(dtime)
|
||||
hud.oldAreas = areaString
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
tick()
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
areas.hud[player:get_player_name()] = nil
|
||||
|
Loading…
Reference in New Issue
Block a user