Skip to content

Commit

Permalink
Stop guns from causing knockback
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneWolfHT committed Apr 21, 2024
1 parent 8544e95 commit 500e50b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mods/ctf/ctf_modes/ctf_mode_classes/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ ctf_modebase.register_mode("classes", {
can_punchplayer = features.can_punchplayer,
on_healplayer = features.on_healplayer,
calculate_knockback = function(player, hitter, time_from_last_punch, tool_capabilities, dir, distance, damage)
if features.can_punchplayer(player, hitter) then
if features.can_punchplayer(player, hitter) and not tool_capabilities.damage_groups.ranged then
return 2 * (tool_capabilities.damage_groups.knockback or 1) * math.min(1, time_from_last_punch or 0)
else
return 0
Expand Down

0 comments on commit 500e50b

Please sign in to comment.