Merge pull request '[cherry pick from MCL5] Add missing call for on_die function' (#1887) from iliekprogrammar/MineClone2:quickfix_slime into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/1887
This commit is contained in:
Elias Fleckenstein 2021-11-03 19:11:53 +00:00
commit 4af5d8e5e8

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