From: z411 Date: Fri, 4 Sep 2020 23:25:49 +0000 (-0400) Subject: Added sounds cmd X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7608aeacaced3ab59b4ab1021ed5f5f120d91ab7;p=xonotic%2Fxonotic-data.pk3dir.git Added sounds cmd --- diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index e60154eee..cb838a433 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -677,6 +677,25 @@ void ClientCommand_spectate(entity caller, int request) } } +void ClientCommand_sounds(entity caller, int request) +{ + switch (request) + { + case CMD_REQUEST_COMMAND: + { + sprint(caller, strcat("Available sounds: \n\n", autocvar_g_chat_sounds_list, "\n")); + return; // never fall through to usage + } + + default: + case CMD_REQUEST_USAGE: + { + sprint(caller, "\nUsage:^3 cmd sounds\n"); + return; + } + } +} + void ClientCommand_suggestmap(entity caller, int request, int argc) { switch (request) @@ -849,6 +868,7 @@ void ClientCommand_(entity caller, int request) CLIENT_COMMAND("selfstuff", ClientCommand_selfstuff(ent, request, command), "Stuffcmd a command to your own client") \ CLIENT_COMMAND("sentcvar", ClientCommand_sentcvar(ent, request, arguments, command), "New system for sending a client cvar to the server") \ CLIENT_COMMAND("spectate", ClientCommand_spectate(ent, request), "Become an observer") \ + CLIENT_COMMAND("sounds", ClientCommand_sounds(ent, request), "Get list of commsnds") \ CLIENT_COMMAND("suggestmap", ClientCommand_suggestmap(ent, request, arguments), "Suggest a map to the mapvote at match end") \ CLIENT_COMMAND("tell", ClientCommand_tell(ent, request, arguments, command), "Send a message directly to a player") \ CLIENT_COMMAND("voice", ClientCommand_voice(ent, request, arguments, command), "Send voice message via sound") \