Rework melee damage (#878)
This commit is contained in:
parent
f06eca30f0
commit
84dc7da461
9 changed files with 45 additions and 66 deletions
|
@ -38,12 +38,11 @@ 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
|
||||
|
@ -72,7 +71,6 @@ function handle_leave_or_die(pname, leave)
|
|||
ctf.registered_on_killedplayer[i](
|
||||
pname,
|
||||
hname,
|
||||
potential_cowards[pname].wielded_item,
|
||||
potential_cowards[pname].toolcaps
|
||||
)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue