engine: generalize maps command and map command autocompletion

This commit is contained in:
Alibek Omarov
2021-06-18 00:05:34 +03:00
parent 0260a6c234
commit 37c5dfa49f
3 changed files with 45 additions and 27 deletions
+5 -6
View File
@@ -244,7 +244,7 @@ void SV_Maps_f( void )
{
const char *separator = "-------------------";
const char *argStr = Cmd_Argv( 1 ); // Substr
int listIndex;
int nummaps;
search_t *mapList;
if( Cmd_Argc() != 2 )
@@ -261,12 +261,11 @@ void SV_Maps_f( void )
return;
}
for( listIndex = 0; listIndex != mapList->numfilenames; ++listIndex )
{
Msg( "%s\n", mapList->filenames[listIndex] + 5 ); // Do not show "maps/"
}
nummaps = Cmd_ListMaps( mapList, NULL, 0 );
Msg( "%s\nDirectory: \"%s/maps\" - Maps listed: %d\n", separator, GI->basedir, mapList->numfilenames );
Mem_Free( mapList );
Msg( "%s\nDirectory: \"%s/maps\" - Maps listed: %d\n", separator, GI->basedir, nummaps );
}
/*