diff options
author | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-06-04 21:49:15 +0000 |
---|---|---|
committer | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-06-04 21:49:15 +0000 |
commit | b949e776ca74e15d78e597fbcb86630cc6c257f7 (patch) | |
tree | 0dd0824f49fdd8de2841b8b3b887a0a483899e8c /code/client/cl_main.c | |
parent | 2bb47821784c5ac3dc33c45624d591c7bf90deb0 (diff) | |
download | ioquake3-aero-b949e776ca74e15d78e597fbcb86630cc6c257f7.tar.gz ioquake3-aero-b949e776ca74e15d78e597fbcb86630cc6c257f7.zip |
VoIP: client can now specify targets for voice transmission.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1365 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/client/cl_main.c')
-rw-r--r-- | code/client/cl_main.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/code/client/cl_main.c b/code/client/cl_main.c index 6c45298..43c2d65 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -190,6 +190,20 @@ void CL_UpdateVoipIgnore(const char *idstr, qboolean ignore) } } +static +void CL_UpdateVoipGain(const char *idstr, float gain) +{ + if ((*idstr >= '0') && (*idstr <= '9')) { + const int id = atoi(idstr); + if (gain < 0.0f) + gain = 0.0f; + if ((id >= 0) && (id < MAX_CLIENTS)) { + clc.voipGain[id] = gain; + Com_Printf("VoIP: player #%d gain now set to %f\n", id, gain); + } + } +} + void CL_Voip_f( void ) { const char *cmd = Cmd_Argv(1); @@ -213,6 +227,8 @@ void CL_Voip_f( void ) CL_UpdateVoipIgnore(Cmd_Argv(2), qtrue); } else if (strcmp(cmd, "unignore") == 0) { CL_UpdateVoipIgnore(Cmd_Argv(2), qfalse); + } else if (strcmp(cmd, "gain") == 0) { + CL_UpdateVoipGain(Cmd_Argv(2), atof(Cmd_Argv(3))); } else if (strcmp(cmd, "muteall") == 0) { Com_Printf("VoIP: muting incoming voice\n"); CL_AddReliableCommand("voip muteall"); |