]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make CA and LMS send correct data to XonStat
authorJan Behrens <zykure@web.de>
Tue, 22 Jan 2013 21:45:30 +0000 (22:45 +0100)
committerJan Behrens <zykure@web.de>
Tue, 22 Jan 2013 21:45:30 +0000 (22:45 +0100)
qcsrc/server/playerstats.qc

index 53f39091393a616b6dcb33399df15b66fec2ebda..3aa33c5a476977879ba16fcdd7dede33430a45e0 100644 (file)
@@ -376,8 +376,10 @@ void PlayerStats_EndMatch(float finished)
        {
                //PlayerStats_Accuracy(p); // stats are already written with PlayerStats_AddGlobalInfo(entity), don't double them up.
                
-               if((g_arena || g_lms || g_ca) && (p.alivetime <= 0)) { continue; }
-               else if(p.classname != "player") { continue; }
+               if (p.classname != "player" && p.classname != "observer") { continue; }
+               else if (g_ca && (p.caplayer == 0)) { continue; }  // spectators in CA have caplayer==0
+               else if (p.frags == FRAGS_SPECTATOR) { continue; } // only spectators have frags==-666
+               else if (g_arena) { continue; }  // FIXME
 
                if(clienttype(p) == CLIENTTYPE_REAL)
                {