Award kill to attacker if victim leaves/suicides (#679)
* Award kill to attacker if player leaves/suicides * Fix death check * Prevent immune players from entering combat
This commit is contained in:
parent
5813a077d2
commit
744a14cd10
2 changed files with 145 additions and 0 deletions
|
@ -131,6 +131,12 @@ ctf.register_on_killedplayer(function(victim, killer, stack, tool_caps)
|
|||
type = "bullet"
|
||||
end
|
||||
|
||||
if tool_caps.damage_groups.combat_log then
|
||||
victim = victim .. " (Combat Log)"
|
||||
elseif tool_caps.damage_groups.suicide then
|
||||
victim = victim .. " (Suicide)"
|
||||
end
|
||||
|
||||
ctf_events.post("kill_" .. type, killer, victim)
|
||||
ctf_events.update_all()
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue