1
0
Fork 0

Add missing call for on_die function

This commit is contained in:
Artem Arbatsky 2021-09-24 16:50:54 +05:00 committed by iliekprogrammar
parent 1518eb81cb
commit db696d0e2b
No known key found for this signature in database
GPG Key ID: 8E7B20514DBCFBFA
1 changed files with 5 additions and 2 deletions

View File

@ -122,7 +122,10 @@ mobs.death_logic = function(self, dtime)
if self.death_animation_timer >= 1.25 then if self.death_animation_timer >= 1.25 then
item_drop(self,false,1) item_drop(self,false,1)
mobs.death_effect(self) mobs.death_effect(self)
mcl_experience.throw_experience(self.object:get_pos(), math_random(self.xp_min, self.xp_max)) mcl_experience.throw_experience(self.object:get_pos(), math_random(self.xp_min, self.xp_max))
if self.on_die then
self.on_die(self, self.object:get_pos())
end
self.object:remove() self.object:remove()
return return
end end
@ -155,4 +158,4 @@ mobs.death_logic = function(self, dtime)
if self.pause_timer <= 0 then if self.pause_timer <= 0 then
mobs.set_velocity(self,0) mobs.set_velocity(self,0)
end end
end end