mirror of
https://repo.or.cz/minetest_hudbars.git
synced 2024-08-20 13:16:07 +02:00
Fix breath bar that was broken by MT 5.3.0
This commit is contained in:
parent
844fff43de
commit
37eff8b2d2
4
init.lua
4
init.lua
@ -488,7 +488,7 @@ local function custom_hud(player)
|
||||
local breath_max = player:get_properties().breath_max
|
||||
local hide_breath
|
||||
if breath >= breath_max and hb.settings.autohide_breath == true then hide_breath = true else hide_breath = false end
|
||||
hb.init_hudbar(player, "breath", math.min(breath, breath_max-1), breath_max-1, hide_breath or hide)
|
||||
hb.init_hudbar(player, "breath", math.min(breath, breath_max), breath_max, hide_breath or hide)
|
||||
end
|
||||
end
|
||||
|
||||
@ -512,7 +512,7 @@ local function update_hud(player)
|
||||
hb.hide_hudbar(player, "breath")
|
||||
else
|
||||
hb.unhide_hudbar(player, "breath")
|
||||
hb.change_hudbar(player, "breath", math.min(breath, breath_max-1), breath_max-1)
|
||||
hb.change_hudbar(player, "breath", math.min(breath, breath_max), breath_max)
|
||||
end
|
||||
--health
|
||||
update_health(player)
|
||||
|
Loading…
Reference in New Issue
Block a user