mirror of
https://github.com/technix/ham_radio.git
synced 2024-08-20 05:04:08 +02:00
optimize broadcast handler
This commit is contained in:
parent
63b9e98b07
commit
2efe6fa8bc
4
init.lua
4
init.lua
@ -86,12 +86,12 @@ minetest.register_globalstep(function(dtime)
|
|||||||
ham_radio:update_hud_display(players[i])
|
ham_radio:update_hud_display(players[i])
|
||||||
end
|
end
|
||||||
updatetimer = 0
|
updatetimer = 0
|
||||||
end
|
-- broadcast timer
|
||||||
if broadcasttimer > ham_radio.settings.broadcast_interval then
|
if broadcasttimer > ham_radio.settings.broadcast_interval then
|
||||||
local players = minetest.get_connected_players()
|
|
||||||
for i=1, #players do
|
for i=1, #players do
|
||||||
ham_radio:update_broadcast(players[i])
|
ham_radio:update_broadcast(players[i])
|
||||||
end
|
end
|
||||||
broadcasttimer = 0
|
broadcasttimer = 0
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user