Merge pull request 'Add missing call for on_die function' (#37) from TheHellBox/MineClone5:on_die_fix into master

Reviewed-on: MineClone5/MineClone5#37
This commit is contained in:
cora 2021-09-25 02:02:00 +00:00
commit b05d7a99a8
1 changed files with 5 additions and 2 deletions

View File

@ -123,6 +123,9 @@ mobs.death_logic = function(self, dtime)
item_drop(self,false,1)
mobs.death_effect(self)
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()
return
end