1 Add check for _old_pos, seem to be nil sometimes
This commit is contained in:
parent
bf9a0734a1
commit
0896b123dd
|
@ -136,6 +136,11 @@ minetest.register_entity('x_bows:arrow_entity', {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_death = function(self, killer)
|
on_death = function(self, killer)
|
||||||
|
if not self._old_pos then
|
||||||
|
self.object:remove()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
minetest.item_drop(ItemStack(self.arrow), nil, vector.round(self._old_pos))
|
minetest.item_drop(ItemStack(self.arrow), nil, vector.round(self._old_pos))
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|
Ŝarĝante…
Reference in New Issue