* Move command argument completion from being hard coded to being associated
with the individual commands to be completed
This commit is contained in:
1 parent
47ee177430
commit
130c0c6575
8 files changed
+195
-89
No files matched your search
@@ -1051,6 +1051,17 @@ static void SV_KillServer_f( void ) {
|
||||
|
||||
//===========================================================
|
||||
|
||||
/*
|
||||
==================
|
||||
SV_CompleteMapName
|
||||
==================
|
||||
*/
|
||||
static void SV_CompleteMapName( char *args, int argNum ) {
|
||||
if( argNum == 2 ) {
|
||||
Field_CompleteFilename( "maps", "bsp", qtrue );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
SV_AddOperatorCommands
|
||||
@@ -1081,10 +1092,14 @@ void SV_AddOperatorCommands( void ) {
|
||||
Cmd_AddCommand ("map_restart", SV_MapRestart_f);
|
||||
Cmd_AddCommand ("sectorlist", SV_SectorList_f);
|
||||
Cmd_AddCommand ("map", SV_Map_f);
|
||||
Cmd_SetCommandCompletionFunc( "map", SV_CompleteMapName );
|
||||
#ifndef PRE_RELEASE_DEMO
|
||||
Cmd_AddCommand ("devmap", SV_Map_f);
|
||||
Cmd_SetCommandCompletionFunc( "devmap", SV_CompleteMapName );
|
||||
Cmd_AddCommand ("spmap", SV_Map_f);
|
||||
Cmd_SetCommandCompletionFunc( "spmap", SV_CompleteMapName );
|
||||
Cmd_AddCommand ("spdevmap", SV_Map_f);
|
||||
Cmd_SetCommandCompletionFunc( "spdevmap", SV_CompleteMapName );
|
||||
#endif
|
||||
Cmd_AddCommand ("killserver", SV_KillServer_f);
|
||||
if( com_dedicated->integer ) {
|
||||
|
||||
Reference in new issue
Block a user