Fix crash on /rankings

This commit is contained in:
rubenwardy 2018-04-19 00:57:21 +01:00
parent 8c33076724
commit dde410ee8d
No known key found for this signature in database
GPG key ID: A1E29D52FF81513C

View file

@ -41,6 +41,8 @@ function ctf_stats.load_legacy()
end end
player_stats.wins.blue = player_stats.wins.blue or 0 player_stats.wins.blue = player_stats.wins.blue or 0
player_stats.wins.red = player_stats.wins.red or 0 player_stats.wins.red = player_stats.wins.red or 0
player_stats.bounty_kills = player_stats.bounty_kills or 0
end end
ctf_stats.matches.wins = ctf_stats.matches.wins or { ctf_stats.matches.wins = ctf_stats.matches.wins or {
@ -114,12 +116,11 @@ function ctf_stats.player(name)
captures = 0, captures = 0,
attempts = 0, attempts = 0,
score = 0, score = 0,
bounty_kills = 0,
} }
ctf_stats.players[name] = player_stats ctf_stats.players[name] = player_stats
end end
player_stats.bounty_kills = player_stats.bounty_kills or 0
local match_player_stats = local match_player_stats =
ctf_stats.current.red[name] or ctf_stats.current.blue[name] ctf_stats.current.red[name] or ctf_stats.current.blue[name]