From 43ef2d25d59f1dd41a05f8e85d32906f7d00775c Mon Sep 17 00:00:00 2001 From: div0 Date: Fri, 1 Aug 2008 13:14:37 +0000 Subject: [PATCH] in "cmd maplist", leave out the maps that won't work in the current game mode anyway git-svn-id: svn://svn.icculus.org/nexuiz/trunk@3996 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/clientcommands.qc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/data/qcsrc/server/clientcommands.qc b/data/qcsrc/server/clientcommands.qc index 8bf0ba8cc..5e10476fb 100644 --- a/data/qcsrc/server/clientcommands.qc +++ b/data/qcsrc/server/clientcommands.qc @@ -282,17 +282,21 @@ void SV_ParseClientCommand(string s) { } } } 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 -- 2.39.2