mirror of
https://github.com/minetest-mods/throwing.git
synced 2025-01-10 02:00:27 +01:00
Remove arrow object if it cannot be throw
This commit is contained in:
parent
9179e12936
commit
1351906574
1
init.lua
1
init.lua
@ -22,6 +22,7 @@ local function shoot_arrow(itemstack, player)
|
|||||||
|
|
||||||
if luaentity.on_throw then
|
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
|
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
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user