Remove arrow object if it cannot be throw

This commit is contained in:
upsilon 2017-01-17 19:22:49 +01:00
parent 9179e12936
commit 1351906574

View File

@ -22,6 +22,7 @@ local function shoot_arrow(itemstack, player)
if luaentity.on_throw then
if luaentity.on_throw(pos, player, ((player:get_wield_index()+1) % inventory:get_size("main")) + 1, luaentity.data, luaentity) == false then
obj:remove()
return false
end
end