1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-04 17:00:23 +02:00

Update builtin/game/hud.lua

Co-authored-by: grorp <gregor.parzefall@posteo.de>
This commit is contained in:
LoneWolfHT
2024-04-24 08:43:31 -07:00
committed by GitHub
parent 6cc80d0603
commit e908ed8563

View File

@ -224,10 +224,10 @@ register_builtin_hud_element("breath", {
-- The breathbar stays for some time and then gets removed. -- The breathbar stays for some time and then gets removed.
breathbar_removal_jobs[player_name] = core.after(1, function() breathbar_removal_jobs[player_name] = core.after(1, function()
local player = core.get_player_by_name(player_name) local player = core.get_player_by_name(player_name)
local id = hud_ids[player_name] local player_hud_ids = hud_ids[player_name]
if player and id and id.breath then if player and player_hud_ids and player_hud_ids.breath then
player:hud_remove(id.breath) player:hud_remove(player_hud_ids.breath)
hud_ids[player_name].breath = nil player_hud_ids.breath = nil
end end
breathbar_removal_jobs[player_name] = nil breathbar_removal_jobs[player_name] = nil
end) end)