mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-27 11:47:32 +01:00
Fix crash on ghast explosions
In certain situations the arrow can be invalidated until its get_pos() is called here - e.g. when the player wears over- enchanted blast protection (65k in this case). This uses the player position for the explosion in these cases
This commit is contained in:
parent
64b8f15f47
commit
e3c5b2cbb5
@ -107,7 +107,12 @@ mcl_mobs:register_arrow("mobs_mc:fireball", {
|
|||||||
full_punch_interval = 1.0,
|
full_punch_interval = 1.0,
|
||||||
damage_groups = {fleshy = 6},
|
damage_groups = {fleshy = 6},
|
||||||
}, nil)
|
}, nil)
|
||||||
mcl_mobs:boom(self, self.object:get_pos(), 1, true)
|
local p = self.object:get_pos()
|
||||||
|
if p then
|
||||||
|
mcl_mobs:boom(self, p, 1, true)
|
||||||
|
else
|
||||||
|
mcl_mobs:boom(self, player:get_pos(), 1, true)
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
hit_mob = function(self, mob)
|
hit_mob = function(self, mob)
|
||||||
|
Loading…
Reference in New Issue
Block a user