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:
LoneWolfHT 2020-09-19 14:35:32 -07:00 committed by GitHub
parent 5813a077d2
commit 744a14cd10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 145 additions and 0 deletions

View file

@ -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)