* Move command argument completion from being hard coded to being associated
with the individual commands to be completed
This commit is contained in:
parent
47ee177430
commit
130c0c6575
8 changed files with 195 additions and 89 deletions
|
@ -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 ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue