diff options
author | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-09-16 21:05:22 +0000 |
---|---|---|
committer | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-09-16 21:05:22 +0000 |
commit | 660be5cc7d3989740b4e6fbd8ed8b1d9c46ebd20 (patch) | |
tree | c609227c4de7d3ea10310714c3262d58665b3ffa /code/server | |
parent | 134e4522a3a9eb3f3e2f8e3646eb3d3999d49694 (diff) | |
download | ioquake3-aero-660be5cc7d3989740b4e6fbd8ed8b1d9c46ebd20.tar.gz ioquake3-aero-660be5cc7d3989740b4e6fbd8ed8b1d9c46ebd20.zip |
* Move command argument completion from being hard coded to being associated
with the individual commands to be completed
git-svn-id: svn://svn.icculus.org/quake3/trunk@1472 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/server')
-rw-r--r-- | code/server/sv_ccmds.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/code/server/sv_ccmds.c b/code/server/sv_ccmds.c index 07a3b44..01bc60d 100644 --- a/code/server/sv_ccmds.c +++ b/code/server/sv_ccmds.c @@ -1053,6 +1053,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 ) { |