r3996 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Aug 1 09:14:37 EDT 2008


Author: div0
Date: 2008-08-01 09:14:37 -0400 (Fri, 01 Aug 2008)
New Revision: 3996

Modified:
   trunk/data/qcsrc/server/clientcommands.qc
Log:
in "cmd maplist", leave out the maps that won't work in the current game mode anyway


Modified: trunk/data/qcsrc/server/clientcommands.qc
===================================================================
--- trunk/data/qcsrc/server/clientcommands.qc	2008-08-01 10:14:49 UTC (rev 3995)
+++ trunk/data/qcsrc/server/clientcommands.qc	2008-08-01 13:14:37 UTC (rev 3996)
@@ -282,17 +282,21 @@
 			}
 		}
 	} else if(argv(0) == "maplist") {
-		local float n;
+		local float n, j;
 		local string col;
 		n = tokenize(cvar_string("g_maplist"));
 		sprint(self, "^7Maps in list: ");
-		for(i = 0; i < n; ++i)
+		for(i = 0, j = 0; i < n; ++i)
 		{
-			if(mod(i, 2))
-				col = "^2";
-			else
-				col = "^3";
-			sprint(self, strcat(col, argv(i), " "));
+			if(MapInfo_CheckMap(argv(i)))
+			{
+				if(mod(j, 2))
+					col = "^2";
+				else
+					col = "^3";
+				sprint(self, strcat(col, argv(i), " "));
+				++j;
+			}
 		}
 		sprint(self, "\n");
 #ifdef MAPINFO




More information about the nexuiz-commits mailing list