Gauges: fix invisibility

master
MoNTE48 2021-12-12 20:53:53 +01:00
parent dc802d5481
commit fdd98e772a
1 changed files with 7 additions and 5 deletions

View File

@ -45,11 +45,13 @@ minetest.register_entity("gauges:hp_bar", {
end
-- Hide gauge if player is invisible
if check_visibility(player) and not self.hide then
gauge:set_properties({
textures = {"blank.png"}
})
self.hide = true
if check_visibility(player) then
if not self.hide then
gauge:set_properties({
textures = {"blank.png"}
})
self.hide = true
end
return
end