From 7005794cc3e6c99102282f28f010d8529d90abf3 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Sun, 5 Mar 2023 13:57:24 +0100 Subject: [PATCH] Merge globalsteps --- src/hud.lua | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/hud.lua b/src/hud.lua index f3fa5de..5bb0951 100644 --- a/src/hud.lua +++ b/src/hud.lua @@ -118,6 +118,10 @@ core.register_globalstep(function(dt) local data = i3.data[name] 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 ~= "" if not data.wielditem_hud then @@ -152,21 +156,6 @@ core.register_globalstep(function(dt) 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 name = player:get_player_name() local data = i3.data[name]