From 6fd876d87c6c13e128a28c00b28e297d76d23a6e Mon Sep 17 00:00:00 2001 From: LoneWolfHT Date: Wed, 23 Dec 2020 13:08:24 -0800 Subject: [PATCH] Nerf gun knockback a little --- shooter/api.lua | 4 +++- shooter_guns/init.lua | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/shooter/api.lua b/shooter/api.lua index 34e9fc4..4c2f882 100644 --- a/shooter/api.lua +++ b/shooter/api.lua @@ -390,7 +390,9 @@ local function fire_weapon(player, itemstack, spec, extended) if spec.user_knockback then if vector.distance(player:get_velocity(), vector.new()) < 10 then local vel = vector.multiply(minetest.yaw_to_dir(player:get_look_horizontal()), -spec.user_knockback) - vel.y = spec.user_knockback/2 + if vel.y > 0 then + vel.y = spec.user_knockback/5 + end player:add_player_velocity(vel) end end diff --git a/shooter_guns/init.lua b/shooter_guns/init.lua index 7ce1699..22be74b 100644 --- a/shooter_guns/init.lua +++ b/shooter_guns/init.lua @@ -71,7 +71,7 @@ shooter.register_weapon("shooter_guns:shotgun", { step = 15, shots = 15, spread = 10, - tool_caps = {full_punch_interval=1.5, damage_groups={fleshy=2, ranged=1}}, + tool_caps = {full_punch_interval=1.7, damage_groups={fleshy=2, ranged=1}}, groups = {snappy=3, fleshy=3, oddly_breakable_by_hand=3}, sounds = { shot = "shooter_shotgun",