diff options
author | Wuzzy <almikes@aol.com> | 2015-02-12 22:15:19 +0100 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2015-02-12 22:15:19 +0100 |
commit | 4ebc24f2ed591a617f2d95536c66e9e3c9d765a4 (patch) | |
tree | 947ac9b0062ff7d4bf8635d223ac82465f66aa1d | |
parent | 05b9c3b8823261de286d725f14c6fab0389e9252 (diff) |
Add workaround for bad initial breath value
-rw-r--r-- | init.lua | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -293,13 +293,13 @@ end local function update_hud(player) if minetest.setting_getbool("enable_damage") then --air - local air = player:get_breath() + local breath = player:get_breath() - if air == 11 then + if breath == 11 then hb.hide_hudbar(player, "breath") else hb.unhide_hudbar(player, "breath") - hb.change_hudbar(player, "breath", air) + hb.change_hudbar(player, "breath", math.min(breath, 10)) end --health |