mirror of
https://github.com/minetest-mods/i3.git
synced 2024-12-25 02:10:39 +01:00
Merge globalsteps
This commit is contained in:
parent
66b88dec3b
commit
7005794cc3
19
src/hud.lua
19
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]
|
||||
|
Loading…
Reference in New Issue
Block a user