Alias loaded weapons
This commit is contained in:
parent
b8e9048b94
commit
7ee40abb2a
2 changed files with 6 additions and 6 deletions
|
@ -260,8 +260,8 @@ local function fire_weapon(player, itemstack, spec, extended)
|
||||||
end
|
end
|
||||||
pos.y = pos.y + config.camera_height
|
pos.y = pos.y + config.camera_height
|
||||||
spec.origin = vector.add(pos, dir)
|
spec.origin = vector.add(pos, dir)
|
||||||
shots[spec.user] = minetest.get_us_time() / 1000000 +
|
local interval = spec.tool_caps.full_punch_interval
|
||||||
spec.tool_caps.full_punch_interval
|
shots[spec.user] = minetest.get_us_time() / 1000000 + interval
|
||||||
minetest.sound_play(spec.sound, {object=player})
|
minetest.sound_play(spec.sound, {object=player})
|
||||||
if spec.bullet_image then
|
if spec.bullet_image then
|
||||||
minetest.add_particle({
|
minetest.add_particle({
|
||||||
|
|
|
@ -139,8 +139,8 @@ if shooter.config.enable_crafting == true then
|
||||||
end
|
end
|
||||||
|
|
||||||
--Backwards compatibility
|
--Backwards compatibility
|
||||||
minetest.register_alias("shooter:shotgun", "shooter_guns:shotgun")
|
minetest.register_alias("shooter:shotgun", "shooter_guns:shotgun_loaded")
|
||||||
minetest.register_alias("shooter:pistol", "shooter_guns:pistol")
|
minetest.register_alias("shooter:pistol", "shooter_guns:pistol_loaded")
|
||||||
minetest.register_alias("shooter:machine_gun", "shooter_guns:machine_gun")
|
minetest.register_alias("shooter:machine_gun", "shooter_guns:machine_gun_loaded")
|
||||||
minetest.register_alias("shooter:rifle", "shooter_guns:rifle")
|
minetest.register_alias("shooter:rifle", "shooter_guns:rifle_loaded")
|
||||||
minetest.register_alias("shooter:ammo", "shooter_guns:ammo")
|
minetest.register_alias("shooter:ammo", "shooter_guns:ammo")
|
||||||
|
|
Loading…
Reference in a new issue