Nerf gun knockback a little
This commit is contained in:
parent
748711b073
commit
6fd876d87c
2 changed files with 4 additions and 2 deletions
|
@ -390,7 +390,9 @@ local function fire_weapon(player, itemstack, spec, extended)
|
||||||
if spec.user_knockback then
|
if spec.user_knockback then
|
||||||
if vector.distance(player:get_velocity(), vector.new()) < 10 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)
|
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)
|
player:add_player_velocity(vel)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -71,7 +71,7 @@ shooter.register_weapon("shooter_guns:shotgun", {
|
||||||
step = 15,
|
step = 15,
|
||||||
shots = 15,
|
shots = 15,
|
||||||
spread = 10,
|
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},
|
groups = {snappy=3, fleshy=3, oddly_breakable_by_hand=3},
|
||||||
sounds = {
|
sounds = {
|
||||||
shot = "shooter_shotgun",
|
shot = "shooter_shotgun",
|
||||||
|
|
Loading…
Reference in a new issue