r1393 - trunk/code/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Jun 25 01:51:05 EDT 2008
Author: icculus
Date: 2008-06-25 01:51:05 -0400 (Wed, 25 Jun 2008)
New Revision: 1393
Modified:
trunk/code/client/cl_input.c
Log:
VoIP: allow targetting last attacker, or the one in your crosshairs.
Modified: trunk/code/client/cl_input.c
===================================================================
--- trunk/code/client/cl_input.c 2008-06-25 05:50:44 UTC (rev 1392)
+++ trunk/code/client/cl_input.c 2008-06-25 05:51:05 UTC (rev 1393)
@@ -763,7 +763,19 @@
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;
More information about the quake3-commits
mailing list