diff options
author | sapier <Sapier at GMX dot net> | 2014-05-10 23:32:25 +0200 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2014-05-10 23:32:25 +0200 |
commit | c8aed03ace88ad979af54f0af2707f6ed9db5655 (patch) | |
tree | 2f44309fe0ba866e3d218efe3aac6fc678202b35 /builtin/game | |
parent | c4359ff65cd8e4e754442b9f2ef7051a8eaa4241 (diff) | |
download | minetest-c8aed03ace88ad979af54f0af2707f6ed9db5655.tar.gz minetest-c8aed03ace88ad979af54f0af2707f6ed9db5655.tar.bz2 minetest-c8aed03ace88ad979af54f0af2707f6ed9db5655.zip |
Fix healthbar not beeing hidden on disabled damage
Diffstat (limited to 'builtin/game')
-rw-r--r-- | builtin/game/statbars.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/game/statbars.lua b/builtin/game/statbars.lua index 9e5699314..ccc192ba4 100644 --- a/builtin/game/statbars.lua +++ b/builtin/game/statbars.lua @@ -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) @@ -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 |