Merge globalsteps

This commit is contained in:
Jean-Patrick Guerrero 2023-03-05 13:57:24 +01:00
parent 66b88dec3b
commit 7005794cc3

View File

@ -118,6 +118,10 @@ core.register_globalstep(function(dt)
local data = i3.data[name] local data = i3.data[name]
if not data then return end if not data then return end
if data.show_hud ~= nil then
show_hud(player, data)
end
local has_text = player:hud_get(data.hud.wielditem).text ~= "" local has_text = player:hud_get(data.hud.wielditem).text ~= ""
if not data.wielditem_hud then if not data.wielditem_hud then
@ -152,21 +156,6 @@ core.register_globalstep(function(dt)
end end
end) end)
core.register_globalstep(function()
local players = get_connected_players()
players[0] = #players
for i = 1, players[0] do
local player = players[i]
local name = player:get_player_name()
local data = i3.data[name]
if data and data.show_hud ~= nil then
show_hud(player, data)
end
end
end)
local function init_waypoints(player) local function init_waypoints(player)
local name = player:get_player_name() local name = player:get_player_name()
local data = i3.data[name] local data = i3.data[name]