mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 09:31:07 +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
1 changed files with 6 additions and 1 deletions
|
@ -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 a new issue