]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix gametype filter bug
authorBuddyFriendGuy <bfggeneral@gmail.com>
Tue, 4 Aug 2015 05:07:28 +0000 (01:07 -0400)
committerBuddyFriendGuy <bfggeneral@gmail.com>
Tue, 4 Aug 2015 05:07:28 +0000 (01:07 -0400)
qcsrc/menu/xonotic/maplist.qc

index 875ef7bd366dd1f6f7a2b898e816be0907090748..b8b24777d1c9ade77d3f2450858b37894ad812d2 100644 (file)
@@ -240,11 +240,15 @@ void XonoticMapList_refilter(entity me)
        {
                j = MapInfo_FindName(argv(i));
                if(j >= 0)
-                       s = strcat(
-                               substring(s, 0, j),
-                               "1",
-                               substring(s, j+1, MapInfo_count - (j+1))
-                       );
+               {
+                       // double check that the two mapnames are "identical", not just share the same prefix
+                       if (strlen(MapInfo_BSPName_ByID(j)) == strlen(argv(i)))
+                               s = strcat(
+                                       substring(s, 0, j),
+                                       "1",
+                                       substring(s, j+1, MapInfo_count - (j+1))
+                               );
+               }
        }
        me.g_maplistCache = strzone(s);
        if(gt != me.lastGametype || f != me.lastFeatures)