void PlayerStats_EndMatch(float finished)
{
entity p;
- PlayerScore_Sort(score_dummyfield, 0, 0);
- PlayerScore_Sort(scoreboard_pos, 1, 1);
- FOR_EACH_CLIENT(p) // spectators intentionally not included
+ PlayerScore_Sort(score_dummyfield, 0, 0, 0);
+ PlayerScore_Sort(scoreboard_pos, 1, 1, 1);
+ FOR_EACH_CLIENT(p)
{
//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.frags == FRAGS_SPECTATOR)
+ continue;
if(clienttype(p) == CLIENTTYPE_REAL)
{