]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
add visual-rank
authorRudolf Polzer <divverent@xonotic.org>
Mon, 14 Jan 2013 10:21:21 +0000 (11:21 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 14 Jan 2013 10:21:21 +0000 (11:21 +0100)
qcsrc/server/playerstats.qc
qcsrc/server/playerstats.qh

index 46e30bb99c11ecbc85da7919b89e941c03af5bd5..f18c81e0a501f46bed2fb178c91cf70f703165b0 100644 (file)
@@ -366,10 +366,12 @@ void PlayerStats_AddGlobalInfo(entity p)
        p.playerstats_id = string_null;
 }
 
+.float visual_rank;
 void PlayerStats_EndMatch(float finished)
 {
-       entity p, winner;
-       winner = PlayerScore_Sort(score_dummyfield, 0);
+       entity p;
+       PlayerScore_Sort(score_dummyfield, 0);
+       PlayerScore_Sort(visual_rank, 1);
        FOR_EACH_CLIENT(p) // spectators intentionally not included
        {
                //PlayerStats_Accuracy(p); // stats are already written with PlayerStats_AddGlobalInfo(entity), don't double them up.
@@ -393,6 +395,7 @@ void PlayerStats_EndMatch(float finished)
                        PlayerStats_Event(p, PLAYERSTATS_WINS, p.winning);
                        PlayerStats_Event(p, PLAYERSTATS_MATCHES, 1);
                        PlayerStats_Event(p, PLAYERSTATS_RANK, p.score_dummyfield);
+                       PlayerStats_Event(p, PLAYERSTATS_VISUAL_RANK, p.visual_rank);
                }
        }
 }
index 11a311028d9d13c70ffdbeb32999c852d5cc1183..3702deba50d20686fc1928005ed3cb61e6f2d130 100644 (file)
@@ -6,6 +6,7 @@ string PLAYERSTATS_MATCHES = "matches";
 string PLAYERSTATS_JOINS = "joins";
 string PLAYERSTATS_SCOREBOARD_VALID = "scoreboardvalid";
 string PLAYERSTATS_RANK = "rank";
+string PLAYERSTATS_VISUAL_RANK = "visual-rank";
 
 string PLAYERSTATS_TOTAL = "total-";
 string PLAYERSTATS_SCOREBOARD = "scoreboard-";