lower health display timer

master
TenPlus1 2016-06-18 09:42:24 +01:00
parent 3362334ee1
commit 80ba7db8ba
1 changed files with 5 additions and 1 deletions

View File

@ -310,9 +310,10 @@ function check_for_death(self)
-- backup nametag so we can show health stats -- backup nametag so we can show health stats
if not self.nametag2 then if not self.nametag2 then
self.nametag2 = self.nametag or "" self.nametag2 = self.nametag or ""
self.htimer = 5
end end
self.htimer = 2
self.nametag = "health: " .. self.health .. " of " .. self.hp_max self.nametag = "health: " .. self.health .. " of " .. self.hp_max
update_tag(self) update_tag(self)
@ -430,7 +431,10 @@ do_env_damage = function(self)
-- reset nametag after showing health stats -- reset nametag after showing health stats
if self.htimer < 1 and self.nametag2 then if self.htimer < 1 and self.nametag2 then
self.nametag = self.nametag2 self.nametag = self.nametag2
self.nametag2 = nil
update_tag(self) update_tag(self)
end end