forked from mtcontrib/mobs_redo
fix constant health tag
This commit is contained in:
parent
608a5178cf
commit
f40d260a81
5
api.lua
5
api.lua
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user