forked from mtcontrib/throwing
1.1.3
This commit is contained in:
parent
d9da1f3ae0
commit
9ca35070c0
@ -31,11 +31,9 @@ function throwing_shoot_arrow (itemstack, player, stiffness, is_cross)
|
|||||||
else
|
else
|
||||||
minetest.sound_play("throwing_bow_sound", {pos=playerpos})
|
minetest.sound_play("throwing_bow_sound", {pos=playerpos})
|
||||||
end
|
end
|
||||||
if obj:get_luaentity().player == "" then
|
obj:get_luaentity().player = player
|
||||||
obj:get_luaentity().player = player
|
|
||||||
end
|
|
||||||
obj:get_luaentity().stack = player:get_inventory():get_stack("main", player:get_wield_index()-1)
|
|
||||||
obj:get_luaentity().inventory = player:get_inventory()
|
obj:get_luaentity().inventory = player:get_inventory()
|
||||||
|
obj:get_luaentity().stack = player:get_inventory():get_stack("main", player:get_wield_index()-1)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -67,7 +65,7 @@ function throwing_reload (itemstack, player, pos, is_cross, loaded)
|
|||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
player:get_inventory():remove_item("main", arrow[1])
|
player:get_inventory():remove_item("main", arrow[1])
|
||||||
end
|
end
|
||||||
meta = arrow[2]
|
local meta = arrow[2]
|
||||||
player:set_wielded_item({name=loaded, wear=wear, metadata=meta})
|
player:set_wielded_item({name=loaded, wear=wear, metadata=meta})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 199 B |
Binary file not shown.
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 199 B |
Binary file not shown.
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 202 B |
Loading…
Reference in New Issue
Block a user