]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add `maplist rebuild` command morosophos/maplist-rebuild-cmd
authorMorosophos <morosophos@teichisma.info>
Fri, 4 Sep 2020 18:44:43 +0000 (21:44 +0300)
committerMorosophos <morosophos@teichisma.info>
Fri, 4 Sep 2020 18:44:43 +0000 (21:44 +0300)
qcsrc/common/command/generic.qc

index 7ef5cb64e5fad9d336c929c0150887c61511dbef..00020a48d90b28f0ff8eee2b8523decd5801df40 100644 (file)
@@ -270,6 +270,12 @@ void GenericCommand_maplist(int request, int argc)
                                        return;
                                }
 
+                        case "rebuild": // rebuilds maplist to include available maps, useful after doing fs_rescan
+                          {
+                            cvar_set("g_maplist", MapInfo_ListAllowedMaps(MapInfo_CurrentGametype(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
+                            return;
+                          }
+
                                case "remove": // scans maplist and only adds back whatever maps were not provided in argv(2)
                                {
                                        if(argc == 3)