From: Samual Date: Tue, 12 Jul 2011 23:51:31 +0000 (-0400) Subject: Gotomap added X-Git-Tag: xonotic-v0.6.0~188^2~28^2~307 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=845645932c86688bd68399172080ff354916944c;p=xonotic%2Fxonotic-data.pk3dir.git Gotomap added --- diff --git a/qcsrc/server/gamecommand.qc b/qcsrc/server/gamecommand.qc index b1d4e747e..3250f0b59 100644 --- a/qcsrc/server/gamecommand.qc +++ b/qcsrc/server/gamecommand.qc @@ -1247,6 +1247,31 @@ void GameCommand_gametype(float request, string command) } } +void GameCommand_gotomap(float request, string command) +{ + float argc = tokenize_console(command); + + switch(request) + { + case GC_REQUEST_HELP: + print(" gotomap - Simple command to switch to another map\n"); + return; + + case GC_REQUEST_COMMAND: + if(argc == 2) + { + print(GotoMap(argv(1)), "\n"); + return; + } + + default: + case GC_REQUEST_USAGE: + print("\nUsage: sv_cmd gotomap map\n"); + print(" Where map is the *.bsp file to change to.\n"); + return; + } +} + void GameCommand(string command) { // ===== TODO list ===== @@ -1283,6 +1308,7 @@ void GameCommand(string command) GameCommand_extendmatchtime(GC_REQUEST_HELP); GameCommand_find(GC_REQUEST_HELP, ""); GameCommand_gametype(GC_REQUEST_HELP, ""); + GameCommand_gotomap(GC_REQUEST_HELP, ""); print(" teamstatus\n"); print(" printstats\n"); print(" make_mapinfo\n"); @@ -1331,6 +1357,7 @@ void GameCommand(string command) case "extendmatchtime": GameCommand_extendmatchtime(search_request_type); break; case "find": GameCommand_find(search_request_type, command); break; case "gametype": GameCommand_gametype(search_request_type, command); break; + case "gotomap": GameCommand_gotomap(search_request_type, command); break; default: print("Invalid command. For a list of supported commands, try sv_cmd help.\n");