mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-01-07 17:17:31 +01:00
Fix picking up tipped arrows
This commit is contained in:
parent
b3f1959d5e
commit
d9efac82c8
@ -93,8 +93,9 @@ local function stuck_arrow_on_step(self, dtime)
|
|||||||
for _,obj in ipairs(objects) do
|
for _,obj in ipairs(objects) do
|
||||||
if obj:is_player() then
|
if obj:is_player() then
|
||||||
if self._collectable and not minetest.is_creative_enabled(obj:get_player_name()) then
|
if self._collectable and not minetest.is_creative_enabled(obj:get_player_name()) then
|
||||||
if obj:get_inventory():room_for_item("main", "mcl_bows:arrow") then
|
local arrow_item = self._arrow_item
|
||||||
obj:get_inventory():add_item("main", "mcl_bows:arrow")
|
if arrow_item and minetest.registered_items[arrow_item] and obj:get_inventory():room_for_item("main", arrow_item) then
|
||||||
|
obj:get_inventory():add_item("main", arrow_item)
|
||||||
minetest.sound_play("item_drop_pickup", {
|
minetest.sound_play("item_drop_pickup", {
|
||||||
pos = pos,
|
pos = pos,
|
||||||
max_hear_distance = 16,
|
max_hear_distance = 16,
|
||||||
|
Loading…
Reference in New Issue
Block a user