From ca51ec9838c054da9262032949a4d49ce89bc1e0 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Thu, 19 Apr 2018 01:01:19 +0100 Subject: [PATCH] Fix crash due to lack of stats migration --- mods/ctf_stats/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ctf_stats/init.lua b/mods/ctf_stats/init.lua index a212355..6c981f2 100644 --- a/mods/ctf_stats/init.lua +++ b/mods/ctf_stats/init.lua @@ -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