Skip to content

Commit

Permalink
Fix healthbar not beeing hidden on disabled damage
Browse files Browse the repository at this point in the history
  • Loading branch information
sapier authored and sapier committed May 10, 2014
1 parent c4359ff commit c8aed03
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions builtin/game/statbars.lua
Expand Up @@ -39,7 +39,8 @@ local function initialize_builtin_statbars(player)
hud_ids[name] = {}
end

if player:hud_get_flags().healthbar then
if player:hud_get_flags().healthbar and
core.is_yes(core.setting_get("enable_damage")) then
if hud_ids[name].id_healthbar == nil then
health_bar_definition.number = player:get_hp()
hud_ids[name].id_healthbar = player:hud_add(health_bar_definition)
Expand All @@ -52,7 +53,8 @@ local function initialize_builtin_statbars(player)
end

if (player:get_breath() < 11) then
if player:hud_get_flags().breathbar then
if player:hud_get_flags().breathbar and
core.is_yes(core.setting_get("enable_damage")) then
if hud_ids[name].id_breathbar == nil then
hud_ids[name].id_breathbar = player:hud_add(breath_bar_definition)
end
Expand Down

0 comments on commit c8aed03

Please sign in to comment.