fixed #7788 (hp_max in update_tag has no value)

This commit is contained in:
Sokomine 2024-12-02 23:42:29 +01:00
parent b9bebe82bd
commit 3cf9da85ca

View File

@ -176,9 +176,13 @@ mobs.mob_class.update_tag = function(self, newname)
local hp_max = 0
if(prop) then
hp_max = prop.hp_max
else
end
if(not(hp_max)) then
hp_max = self.hp_max
end
if(not(hp_max)) then
hp_max = self.health
end
local qua = hp_max / 6
if(self.force_nametag_color) then