From 304d4258d3a49488f570b8ad71931faa7e5d40ba Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sat, 3 Oct 2009 12:31:59 +0000 Subject: * Merge ioq3-r1498, by popular demand --- src/server/sv_ccmds.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/server/sv_ccmds.c') diff --git a/src/server/sv_ccmds.c b/src/server/sv_ccmds.c index 367ca23d..1da5aaeb 100644 --- a/src/server/sv_ccmds.c +++ b/src/server/sv_ccmds.c @@ -257,6 +257,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 @@ -276,7 +287,9 @@ 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 ); Cmd_AddCommand ("devmap", SV_Map_f); + Cmd_SetCommandCompletionFunc( "devmap", SV_CompleteMapName ); Cmd_AddCommand ("killserver", SV_KillServer_f); } -- cgit