Fix reload action not taking ammo

This commit is contained in:
Lone_Wolf 2019-05-25 16:35:22 -07:00 committed by stujones11
parent 8caadbab5e
commit cfb3818b09

View file

@ -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})