Compare commits

...

1 Commits

Author SHA1 Message Date
chmodsayshello d4ad108bdd fix crash in mcl_mobs 2022-05-29 21:44:37 +02:00
1 changed files with 3 additions and 3 deletions

View File

@ -2958,7 +2958,7 @@ local function check_item_pickup(self)
end
end
local function damage_mob(self,reason,damage)
local function damage_mob(self,reason,damage,pos)
if not self.health then return end
damage = floor(damage)
if damage > 0 then
@ -2989,7 +2989,7 @@ local function check_entity_cramming(self)
elseif l.cram == nil and not self.child then
table.insert(ncram,l)
elseif l.cram then
damage_mob(l,"cramming",CRAMMING_DAMAGE)
damage_mob(l,"cramming",CRAMMING_DAMAGE,p)
end
end
end
@ -3079,7 +3079,7 @@ local falling = function(self, pos)
if add ~= 0 then
damage = damage + damage * (add/100)
end
damage_mob(self,"fall",damage)
damage_mob(self,"fall",damage,pos)
end
self.old_y = self.object:get_pos().y