forked from MineClone5/MineClone5
Fix crash in mcl_bows/rocket.lua:41
This commit is contained in:
parent
a637e4bdaf
commit
89cbc1deed
|
@ -38,7 +38,9 @@ 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())},
|
||||
|
@ -46,6 +48,7 @@ local function damage_explosion(self, damagemulitplier)
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function particle_explosion(self)
|
||||
local particle_pattern = math.random(1, 3)
|
||||
|
|
Loading…
Reference in New Issue