Merged in feature/1-server-crash-draconic-mod (pull request #1)
1 Add check for _old_pos, seem to be nil sometimes
This commit is contained in:
commit
c827a4cef5
|
@ -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