summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-06-18 09:42:24 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2016-06-18 09:42:24 +0100
commit80ba7db8ba91d12c274a31eca8778338a120b8b5 (patch)
tree339bde469b7995be2f5a2ab7fb01d25cd3d4e6db
parent3362334ee12b3a1c1fbe6827678b01c77d1d8f46 (diff)
lower health display timer
-rw-r--r--api.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/api.lua b/api.lua
index e6e954c..7c80664 100644
--- a/api.lua
+++ b/api.lua
@@ -310,9 +310,10 @@ function check_for_death(self)
-- backup nametag so we can show health stats
if not self.nametag2 then
self.nametag2 = self.nametag or ""
- self.htimer = 5
end
+ self.htimer = 2
+
self.nametag = "health: " .. self.health .. " of " .. self.hp_max
update_tag(self)
@@ -430,7 +431,10 @@ do_env_damage = function(self)
-- reset nametag after showing health stats
if self.htimer < 1 and self.nametag2 then
+
self.nametag = self.nametag2
+ self.nametag2 = nil
+
update_tag(self)
end