From: Morosophos Date: Fri, 4 Sep 2020 18:44:43 +0000 (+0300) Subject: Add `maplist rebuild` command X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2523f71c15edab31fba6822e664ba700039d5ac8;p=xonotic%2Fxonotic-data.pk3dir.git Add `maplist rebuild` command --- diff --git a/qcsrc/common/command/generic.qc b/qcsrc/common/command/generic.qc index 7ef5cb64e..00020a48d 100644 --- a/qcsrc/common/command/generic.qc +++ b/qcsrc/common/command/generic.qc @@ -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)