Alias loaded weapons

This commit is contained in:
stujones11 2019-03-23 17:55:21 +00:00
parent b8e9048b94
commit 7ee40abb2a
2 changed files with 6 additions and 6 deletions

View file

@ -260,8 +260,8 @@ local function fire_weapon(player, itemstack, spec, extended)
end
pos.y = pos.y + config.camera_height
spec.origin = vector.add(pos, dir)
shots[spec.user] = minetest.get_us_time() / 1000000 +
spec.tool_caps.full_punch_interval
local interval = spec.tool_caps.full_punch_interval
shots[spec.user] = minetest.get_us_time() / 1000000 + interval
minetest.sound_play(spec.sound, {object=player})
if spec.bullet_image then
minetest.add_particle({

View file

@ -139,8 +139,8 @@ if shooter.config.enable_crafting == true then
end
--Backwards compatibility
minetest.register_alias("shooter:shotgun", "shooter_guns:shotgun")
minetest.register_alias("shooter:pistol", "shooter_guns:pistol")
minetest.register_alias("shooter:machine_gun", "shooter_guns:machine_gun")
minetest.register_alias("shooter:rifle", "shooter_guns:rifle")
minetest.register_alias("shooter:shotgun", "shooter_guns:shotgun_loaded")
minetest.register_alias("shooter:pistol", "shooter_guns:pistol_loaded")
minetest.register_alias("shooter:machine_gun", "shooter_guns:machine_gun_loaded")
minetest.register_alias("shooter:rifle", "shooter_guns:rifle_loaded")
minetest.register_alias("shooter:ammo", "shooter_guns:ammo")