diff --git a/builtin/game/statbars.lua b/builtin/game/statbars.lua index aef86da21941a..77aaea5abd1e0 100644 --- a/builtin/game/statbars.lua +++ b/builtin/game/statbars.lua @@ -29,6 +29,10 @@ local function scaleToDefault(player, field) -- Scale "hp" or "breath" to the default dimensions local current = player["get_" .. field](player) local nominal = core["PLAYER_MAX_".. field:upper() .. "_DEFAULT"] + if field == "breath" then + -- Show up/scale to 10 bubbles. Default 11 lets the bar disappear. + nominal = nominal - 1 + end local max_display = math.max(nominal, math.max(player:get_properties()[field .. "_max"], current)) return current / max_display * nominal