r3190 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Jan 19 11:25:32 EST 2008


Author: div0
Date: 2008-01-19 11:25:32 -0500 (Sat, 19 Jan 2008)
New Revision: 3190

Modified:
   trunk/data/qcsrc/server/clientcommands.qc
Log:
"cmd lsmaps" for mapinfo mode lists all installed maps of the current game mode


Modified: trunk/data/qcsrc/server/clientcommands.qc
===================================================================
--- trunk/data/qcsrc/server/clientcommands.qc	2008-01-19 14:26:48 UTC (rev 3189)
+++ trunk/data/qcsrc/server/clientcommands.qc	2008-01-19 16:25:32 UTC (rev 3190)
@@ -171,6 +171,7 @@
 void SV_ParseClientCommand(string s) {
 	local string cmd;
 	local entity e;
+	local float i;
 
 	tokenize(s);
 
@@ -451,7 +452,7 @@
 			}
 		}
 	} else if(argv(0) == "maplist") {
-		local float i, n;
+		local float n;
 		local string col;
 		n = tokenize(cvar_string("g_maplist"));
 		sprint(self, "^7Maps in list: ");
@@ -464,6 +465,19 @@
 			sprint(self, strcat(col, argv(i), " "));
 		}
 		sprint(self, "\n");
+#ifdef MAPINFO
+	} else if(argv(0) == "lsmaps") {
+		sprint(self, "^7Maps available: ");
+		for(i = 0; i < MapInfo_count; ++i)
+		{
+			if(mod(i, 2))
+				col = "^2";
+			else
+				col = "^3";
+			sprint(self, strcat(col, MapInfo_BSPName_ByID(i), " "));
+		}
+		sprint(self, "\n");
+#endif
 	} else if(argv(0) == "teamstatus") {
 		PrintScoreboard(self);
 	} else if(argv(0) == "voice") {




More information about the nexuiz-commits mailing list