diff options
Diffstat (limited to 'code/server/sv_ccmds.c')
-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 ) { |