Fix reload action not taking ammo
This commit is contained in:
parent
8caadbab5e
commit
cfb3818b09
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ shooter.register_weapon = function(name, def)
|
||||||
on_use = function(itemstack, user)
|
on_use = function(itemstack, user)
|
||||||
local inv = user:get_inventory()
|
local inv = user:get_inventory()
|
||||||
if inv then
|
if inv then
|
||||||
local stack = def.reload_item
|
local stack = def.spec.reload_item
|
||||||
if inv:contains_item("main", stack) then
|
if inv:contains_item("main", stack) then
|
||||||
local sound = def.spec.sounds.reload or "shooter_reload"
|
local sound = def.spec.sounds.reload or "shooter_reload"
|
||||||
minetest.sound_play(sound, {object=user})
|
minetest.sound_play(sound, {object=user})
|
||||||
|
|
Loading…
Reference in a new issue