Skip to content

Commit 500e50b

Browse files
committed
Stop guns from causing knockback
1 parent 8544e95 commit 500e50b

File tree

1 file changed

+1
-1
lines changed
  • mods/ctf/ctf_modes/ctf_mode_classes

1 file changed

+1
-1
lines changed

mods/ctf/ctf_modes/ctf_mode_classes/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ ctf_modebase.register_mode("classes", {
147147
can_punchplayer = features.can_punchplayer,
148148
on_healplayer = features.on_healplayer,
149149
calculate_knockback = function(player, hitter, time_from_last_punch, tool_capabilities, dir, distance, damage)
150-
if features.can_punchplayer(player, hitter) then
150+
if features.can_punchplayer(player, hitter) and not tool_capabilities.damage_groups.ranged then
151151
return 2 * (tool_capabilities.damage_groups.knockback or 1) * math.min(1, time_from_last_punch or 0)
152152
else
153153
return 0

0 commit comments

Comments
 (0)