forked from MineClone5/MineClone5
Fix crash in mcl_bows/rocket.lua:41
This commit is contained in:
parent
a637e4bdaf
commit
89cbc1deed
|
@ -38,13 +38,16 @@ local function damage_explosion(self, damagemulitplier)
|
|||
for _,obj in pairs(objects) do
|
||||
if obj:is_player() then
|
||||
mcl_util.deal_damage(obj, damagemulitplier - vector.distance(self.object:get_pos(), obj:get_pos()), {type = "explosion"})
|
||||
elseif obj:get_luaentity()._cmi_is_mob then
|
||||
else
|
||||
local entity = obj:get_luaentity()
|
||||
if entity and entity._cmi_is_mob then
|
||||
obj:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups={fleshy=damagemulitplier - vector.distance(self.object:get_pos(), obj:get_pos())},
|
||||
}, self.object:get_velocity())
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function particle_explosion(self)
|
||||
|
|
Loading…
Reference in New Issue