]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Arena, LMS, CA: decide scoreboard validity by alivetime, not by spectator state
authorRudolf Polzer <divverent@alientrap.org>
Mon, 17 Oct 2011 13:32:18 +0000 (15:32 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 17 Oct 2011 13:33:14 +0000 (15:33 +0200)
qcsrc/server/playerstats.qc

index 43c8d8d8971c6b0ba657e0088f26b6d91674677f..d74cb0f38bb14edda35a797cc094d041524fc7d8 100644 (file)
@@ -344,11 +344,21 @@ void PlayerStats_AddGlobalInfo(entity p)
 void PlayerStats_EndMatch(float finished)
 {
        entity p, winner;
-    winner = PlayerScore_Sort(score_dummyfield);
-       FOR_EACH_PLAYER(p) // spectators intentionally not included
+       winner = PlayerScore_Sort(score_dummyfield);
+       FOR_EACH_CLIENT(p) // spectators intentionally not included
        {
-               PlayerScore_PlayerStats(p);
                PlayerStats_Accuracy(p);
+               if(g_arena || g_lms || g_ca)
+               {
+                       if(p.alivetime <= 0)
+                               continue;
+               }
+               else
+               {
+                       if(p.classname != "player")
+                               continue;
+               }
+               PlayerScore_PlayerStats(p);
                PlayerStats_Event(p, PLAYERSTATS_SCOREBOARD_VALID, 1);
                if(finished)
                {