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:
Juraj Vajda 2021-05-29 16:05:10 +00:00
commit c827a4cef5

View File

@ -136,6 +136,11 @@ minetest.register_entity('x_bows:arrow_entity', {
end,
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))
end,