fix constant health tag

This commit is contained in:
TenPlus1 2017-05-28 20:57:14 +01:00
parent 608a5178cf
commit f40d260a81

View File

@ -372,6 +372,11 @@ end
-- check if mob is dead or only hurt -- check if mob is dead or only hurt
local check_for_death = function(self, cause) 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 self.old_health = self.health
-- still got some health? play hurt sound -- still got some health? play hurt sound