mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-11-11 04:40:28 +01:00
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
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user