Nerf gun knockback a little

This commit is contained in:
LoneWolfHT 2020-12-23 13:08:24 -08:00
parent 748711b073
commit 6fd876d87c
2 changed files with 4 additions and 2 deletions

View file

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