From: Samual Date: Fri, 16 Dec 2011 13:24:16 +0000 (-0500) Subject: add mv_download command back to client X-Git-Tag: xonotic-v0.6.0~188^2~28^2~135 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=0e66de2a8d3215d33fc104fe79e58f4de97ec74c add mv_download command back to client --- diff --git a/qcsrc/client/command/cl_cmd.qc b/qcsrc/client/command/cl_cmd.qc index 4be39bf8b..254e428c9 100644 --- a/qcsrc/client/command/cl_cmd.qc +++ b/qcsrc/client/command/cl_cmd.qc @@ -213,6 +213,27 @@ void GameCommand_hud(float request, float argc) // TODO: Add aliases in commands } } +void GameCommand_mv_download(float request, float argc) +{ + switch(request) + { + case CMD_REQUEST_COMMAND: + { + Cmd_MapVote_MapDownload(argc); + + return; + } + + default: + case CMD_REQUEST_USAGE: + { + print("\nUsage:^3 cl_cmd mapvote_download mapid\n"); + print(" Where 'mapid' is the id number of the map to request an image of on the map vote selection menu.\n"); + return; + } + } +} + void GameCommand_sendcvar(float request, float argc) { switch(request) @@ -248,7 +269,7 @@ void GameCommand_settemp(float request, float argc) { switch(request) { - case GC_REQUEST_COMMAND: + case CMD_REQUEST_COMMAND: { if((argv(1) == "restore") && (argc == 3)) { @@ -271,7 +292,7 @@ void GameCommand_settemp(float request, float argc) } default: - case GC_REQUEST_USAGE: + case CMD_REQUEST_USAGE: { print("\nUsage:^3 cl_cmd settemp | [restore]\n"); print(" Where 'cvar' is the cvar plus arguments to send to the server,\n"); @@ -312,6 +333,7 @@ void GameCommand_(float request) #define CLIENT_COMMANDS(request,arguments) \ CLIENT_COMMAND("blurtest", GameCommand_blurtest(request), "Feature for testing blur postprocessing") \ CLIENT_COMMAND("hud", GameCommand_hud(request, arguments), "Commands regarding/controlling the HUD system") \ + CLIENT_COMMAND("mv_download", GameCommand_mv_download(request, arguments), "Retrieve mapshot picture from the server") \ CLIENT_COMMAND("sendcvar", GameCommand_sendcvar(request, arguments), "Send a cvar to the server (like weaponpriority)") \ CLIENT_COMMAND("settemp", GameCommand_settemp(request, arguments), "Temporarily set a value to a cvar which is restored by command or end of each match") \ /* nothing */ diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index 0af74018e..fe22c0f4b 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -280,7 +280,7 @@ void Cmd_MapVote_MapDownload(float argc) return; } else { print(_("Requesting preview...\n")); - localcmd(strcat("\ncmd mv_getpic ", ftos(id), "\n")); + localcmd(strcat("\ncmd getmapvotepic ", ftos(id), "\n")); } }