]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/command/generic.qc
Merge branch 'terencehill/lms_itemtimes_fix' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / command / generic.qc
index 6fb73cf1e41295f8da2d811615fa02e54e4488e5..5b53592831e8832154eea0220e4cace928af910d 100644 (file)
 #endif
 
 #ifdef CSQC
-       #include "../../client/commands/cl_cmd.qh"
+       #include <client/commands/cl_cmd.qh>
 #endif
 
 #ifdef SVQC
-       #include "../../server/command/banning.qh"
-       #include "../../server/command/cmd.qh"
-       #include "../../server/command/common.qh"
-       #include "../../server/command/sv_cmd.qh"
-       #include "../../common/turrets/config.qh"
-       #include "../../common/weapons/config.qh"
+       #include <server/command/banning.qh>
+       #include <server/command/cmd.qh>
+       #include <server/command/common.qh>
+       #include <server/command/sv_cmd.qh>
+       #include <common/turrets/config.qh>
+       #include <common/weapons/config.qh>
 #endif
 
 // =========================================================
@@ -274,16 +274,9 @@ void GenericCommand_maplist(float request, float argc)
                                {
                                        MapInfo_Enumerate();
                                        MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
-                                       argc = tokenizebyseparator(cvar_string("g_maplist"), " ");
-
-                                       tmp_string = "";
-                                       for(i = 0; i < argc; ++i)
-                                               if(MapInfo_CheckMap(argv(i)))
-                                                       tmp_string = strcat(tmp_string, " ", argv(i));
-
-                                       tmp_string = substring(tmp_string, 1, strlen(tmp_string) - 1);
-                                       cvar_set("g_maplist", tmp_string);
-
+                                       string filtered = "";
+                                       FOREACH_WORD(cvar_string("g_maplist"), MapInfo_CheckMap(it), filtered = cons(filtered, it));
+                                       cvar_set("g_maplist", filtered);
                                        return;
                                }
 
@@ -502,7 +495,7 @@ void GenericCommand_runtest(float request, float argc)
                                        TEST_Run(argv(i));
                        }
                        else
-                               TEST_RunAll();
+                               RUN_ALL_TESTS();
                        return;
                }