From b489d36173ae7cb021f3c2bddfea2199820732ac Mon Sep 17 00:00:00 2001 From: div0 Date: Sat, 19 Jan 2008 16:25:32 +0000 Subject: [PATCH] "cmd lsmaps" for mapinfo mode lists all installed maps of the current game mode git-svn-id: svn://svn.icculus.org/nexuiz/trunk/data@3190 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- qcsrc/server/clientcommands.qc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/clientcommands.qc b/qcsrc/server/clientcommands.qc index c10aa3a2d..d616e1cf4 100644 --- a/qcsrc/server/clientcommands.qc +++ b/qcsrc/server/clientcommands.qc @@ -171,6 +171,7 @@ entity GetKickVoteVictim(string vote, string cmd) void SV_ParseClientCommand(string s) { local string cmd; local entity e; + local float i; tokenize(s); @@ -451,7 +452,7 @@ void SV_ParseClientCommand(string s) { } } } 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 @@ void SV_ParseClientCommand(string s) { 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") { -- 2.39.2