diff options
author | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-06-25 05:51:05 +0000 |
---|---|---|
committer | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-06-25 05:51:05 +0000 |
commit | ab3680c17ea0c97ab6cbfd9e11e5bb4c501962c2 (patch) | |
tree | e856fe0cf215100d053f65e1814a746968a56ec5 /code | |
parent | 800f3b2d6e1133e5e9cda2b3a144201e571c357c (diff) | |
download | ioquake3-aero-ab3680c17ea0c97ab6cbfd9e11e5bb4c501962c2.tar.gz ioquake3-aero-ab3680c17ea0c97ab6cbfd9e11e5bb4c501962c2.zip |
VoIP: allow targetting last attacker, or the one in your crosshairs.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1393 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r-- | code/client/cl_input.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/code/client/cl_input.c b/code/client/cl_input.c index 323aba1..a17a662 100644 --- a/code/client/cl_input.c +++ b/code/client/cl_input.c @@ -763,7 +763,19 @@ void CL_WritePacket( void ) { if (clc.voipOutgoingDataSize > 0) { // only send if data. // Move cl_voipSendTarget from a string to the bitmasks if needed. if (cl_voipSendTarget->modified) { + char buffer[32]; const char *target = cl_voipSendTarget->string; + + if (Q_stricmp(target, "attacker") == 0) { + int player = VM_Call( cgvm, CG_LAST_ATTACKER ); + Com_sprintf(buffer, sizeof (buffer), "%d", player); + target = buffer; + } else if (Q_stricmp(target, "crosshair") == 0) { + int player = VM_Call( cgvm, CG_CROSSHAIR_PLAYER ); + Com_sprintf(buffer, sizeof (buffer), "%d", player); + target = buffer; + } + if ((*target == '\0') || (Q_stricmp(target, "all") == 0)) { const int all = 0x7FFFFFFF; clc.voipTarget1 = clc.voipTarget2 = clc.voipTarget3 = all; |