Fix crash when hit fails with drop arrow

This commit is contained in:
upsilon 2018-01-06 10:17:25 +01:00
parent 51dba5b870
commit 6c888d0313
No known key found for this signature in database
GPG Key ID: A80DAE1F266E1C3C
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ if get_setting("drop_arrow") then
on_hit = function(self, _, last_pos, _, _, hitter, data)
minetest.item_drop(ItemStack(data.itemstack), hitter, last_pos)
end,
on_hit_fails = function(_, thrower, data)
on_hit_fails = function(self, _, thrower, data)
if not minetest.setting_getbool("creative_mode") then
thrower:get_inventory():set_stack("main", data.index, data.itemstack)
end