r4000 - trunk/data/qcsrc/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Aug 1 14:33:00 EDT 2008


Author: div0
Date: 2008-08-01 14:33:00 -0400 (Fri, 01 Aug 2008)
New Revision: 4000

Modified:
   trunk/data/qcsrc/client/Main.qc
   trunk/data/qcsrc/client/sbar.qc
Log:
always sort downloaders/connectors below spectators


Modified: trunk/data/qcsrc/client/Main.qc
===================================================================
--- trunk/data/qcsrc/client/Main.qc	2008-08-01 18:25:18 UTC (rev 3999)
+++ trunk/data/qcsrc/client/Main.qc	2008-08-01 18:33:00 UTC (rev 4000)
@@ -169,6 +169,7 @@
 				playerslots[i].gotscores = 0;
 				SetTeam(playerslots[i], COLOR_SPECTATOR);
 				RegisterPlayer(playerslots[i]);
+				Sbar_UpdatePlayerPos(playerslots[i]);
 			}
 		}
 	}

Modified: trunk/data/qcsrc/client/sbar.qc
===================================================================
--- trunk/data/qcsrc/client/sbar.qc	2008-08-01 18:25:18 UTC (rev 3999)
+++ trunk/data/qcsrc/client/sbar.qc	2008-08-01 18:33:00 UTC (rev 4000)
@@ -202,7 +202,13 @@
 		return false;
 
 	if(vl == COLOR_SPECTATOR)
-		return false; // sorting spectators is pointless, do not do it
+	{
+		// FIRST the one with scores (spectators), THEN the ones without (downloaders)
+		// no other sorting
+		if(!left.gotscores && right.gotscores)
+			return true;
+		return false;
+	}
 
 	vl = left.scores[ps_primary];
 	vr = right.scores[ps_primary];




More information about the nexuiz-commits mailing list