]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapinfo.qc
Merge branch 'master' into terencehill/physics_panel_update
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapinfo.qc
index a6b0788088216c93b53f2a0dfa96aabc5ed5e820..cca716a339abb4bc3cd78bbc2af6b7af2fd224a5 100644 (file)
@@ -802,7 +802,7 @@ float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametype
 {
        string fn;
        string s, t;
-       float fh, fh2;
+       float fh;
        float r, f, n, i, p;
        string acl;
 
@@ -1253,6 +1253,24 @@ string MapInfo_ListAllowedMaps(float pRequiredFlags, float pForbiddenFlags)
        return substring(out, 1, strlen(out) - 1);
 }
 
+string MapInfo_ListAllAllowedMaps(float pRequiredFlags, float pForbiddenFlags)
+{
+       string out;
+       float i;
+
+       // to make absolutely sure:
+       MapInfo_Enumerate();
+       MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, pRequiredFlags, pForbiddenFlags, 0);
+
+       out = "";
+       for(i = 0; i < MapInfo_count; ++i)
+               out = strcat(out, " ", _MapInfo_GlobItem(MapInfo_FilterList_Lookup(i)));
+
+       MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), pRequiredFlags, pForbiddenFlags, 0);
+
+       return substring(out, 1, strlen(out) - 1);
+}
+
 void MapInfo_LoadMapSettings(string s) // to be called from worldspawn
 {
        float t, t0;