From f40d260a8175e7ddae5b977b36e5e9b3d8355b5a Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sun, 28 May 2017 20:57:14 +0100 Subject: [PATCH] fix constant health tag --- api.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api.lua b/api.lua index 0516668..e649787 100644 --- a/api.lua +++ b/api.lua @@ -372,6 +372,11 @@ end -- check if mob is dead or only hurt local check_for_death = function(self, cause) + -- has health actually changed? + if self.health == self.old_health and self.health > 0 then + return + end + self.old_health = self.health -- still got some health? play hurt sound