Merge branch 'master' of https://github.com/MT-CTF/capturetheflag
This commit is contained in:
commit
65118f5e72
2 changed files with 24 additions and 6 deletions
|
@ -417,6 +417,20 @@ function ctf_stats.calculateKillReward(victim, killer, toolcaps)
|
|||
return reward
|
||||
end
|
||||
|
||||
ctf.register_on_killedplayer(function(victim, killer)
|
||||
-- Suicide is not encouraged here at CTF
|
||||
if victim == killer then
|
||||
return
|
||||
end
|
||||
local main, match = ctf_stats.player(killer)
|
||||
if main and match then
|
||||
main.kills = main.kills + 1
|
||||
match.kills = match.kills + 1
|
||||
match.kills_since_death = match.kills_since_death + 1
|
||||
_needs_save = true
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_dieplayer(function(player)
|
||||
local main, match = ctf_stats.player(player:get_player_name())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue