Fix crash due to lack of stats migration

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

View file

@ -41,8 +41,6 @@ function ctf_stats.load_legacy()
end
player_stats.wins.blue = player_stats.wins.blue or 0
player_stats.wins.red = player_stats.wins.red or 0
player_stats.bounty_kills = player_stats.bounty_kills or 0
end
ctf_stats.matches.wins = ctf_stats.matches.wins or {
@ -85,6 +83,8 @@ function ctf_stats.load()
if not player_stats.score or player_stats.score <= 0 then
ctf_stats.players[name] = nil
ctf.needs_save = true
else
player_stats.bounty_kills = player_stats.bounty_kills or 0
end
end
end