mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-30 16:01:46 +00:00
VoIP: Only update from cl_voipSendTarget if sending data.
This commit is contained in:
parent
c50799fcf7
commit
8028fc042c
1 changed files with 28 additions and 27 deletions
|
@ -759,11 +759,13 @@ void CL_WritePacket( void ) {
|
|||
}
|
||||
|
||||
#if USE_VOIP
|
||||
// Move cl_voipSendTarget from a string to a
|
||||
if (clc.voipOutgoingDataSize > 0) { // only send if data.
|
||||
// Move cl_voipSendTarget from a string to the bitmasks if needed.
|
||||
if (cl_voipSendTarget->modified) {
|
||||
const char *target = cl_voipSendTarget->string;
|
||||
if ((*target == '\0') || (Q_stricmp(target, "all") == 0)) {
|
||||
clc.voipTarget1 = clc.voipTarget2 = clc.voipTarget3 = 0x7FFFFFFF;
|
||||
const int all = 0x7FFFFFFF;
|
||||
clc.voipTarget1 = clc.voipTarget2 = clc.voipTarget3 = all;
|
||||
} else if (Q_stricmp(target, "none") == 0) {
|
||||
clc.voipTarget1 = clc.voipTarget2 = clc.voipTarget3 = 0;
|
||||
} else {
|
||||
|
@ -786,7 +788,6 @@ void CL_WritePacket( void ) {
|
|||
cl_voipSendTarget->modified = qfalse;
|
||||
}
|
||||
|
||||
if (clc.voipOutgoingDataSize > 0) { // only send if data.
|
||||
MSG_WriteByte (&buf, clc_EOF); // placate legacy servers.
|
||||
MSG_WriteByte (&buf, clc_extension);
|
||||
MSG_WriteByte (&buf, clc_voip);
|
||||
|
|
Loading…
Reference in a new issue