From: Samual Lenks Date: Wed, 5 Sep 2012 22:07:29 +0000 (-0400) Subject: Fix 2x accuracy bug for stats X-Git-Tag: xonotic-v0.7.0~254 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f8577cea6f77aa4b94d8819aa82d7014e4cfe52d;p=xonotic%2Fxonotic-data.pk3dir.git Fix 2x accuracy bug for stats --- diff --git a/qcsrc/server/playerstats.qc b/qcsrc/server/playerstats.qc index 87220328f..b2b2750a7 100644 --- a/qcsrc/server/playerstats.qc +++ b/qcsrc/server/playerstats.qc @@ -344,6 +344,7 @@ void PlayerStats_Accuracy(entity p) PlayerStats_Event(p, strcat("acc-", w.netname, "-frags"), a.(accuracy_frags[i-1])); } + //backtrace(strcat("adding player stat accuracy for ", p.netname, ".\n")); } void PlayerStats_AddGlobalInfo(entity p) @@ -384,17 +385,13 @@ void PlayerStats_EndMatch(float finished) winner = PlayerScore_Sort(score_dummyfield); FOR_EACH_CLIENT(p) // spectators intentionally not included { - PlayerStats_Accuracy(p); + //PlayerStats_Accuracy(p); // stats are already written with PlayerStats_AddGlobalInfo(entity), don't double them up. + if(g_arena || g_lms || g_ca) - { - if(p.alivetime <= 0) - continue; - } + if(p.alivetime <= 0) { continue; } else - { - if(p.classname != "player") - continue; - } + if(p.classname != "player") { continue; } + PlayerScore_PlayerStats(p); PlayerStats_Event(p, PLAYERSTATS_SCOREBOARD_VALID, 1); if(finished)