Revert "Rework melee damage (#878)" (#925)

This reverts commit 84dc7da461.
This commit is contained in:
LoneWolfHT 2021-09-03 16:20:18 -07:00 committed by GitHub
parent 84dc7da461
commit ea9d9ad2d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 66 additions and 45 deletions

View file

@ -38,11 +38,12 @@ ctf.register_on_attack(function(player, hitter,
potential_cowards[pname].timer = 0
potential_cowards[pname].puncher = hname
potential_cowards[pname].wielded_item = hitter:get_wielded_item()
potential_cowards[pname].toolcaps = tool_capabilities
end
end)
ctf.register_on_killedplayer(function(victim, killer, toolcaps)
ctf.register_on_killedplayer(function(victim, killer, _, toolcaps)
if toolcaps.damage_groups.combat_log or toolcaps.damage_groups.suicide then
return
end
@ -71,6 +72,7 @@ function handle_leave_or_die(pname, leave)
ctf.registered_on_killedplayer[i](
pname,
hname,
potential_cowards[pname].wielded_item,
potential_cowards[pname].toolcaps
)
end