From 6b6bf7e4585048cf64e79908903200e13f36471f Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 3 Sep 2025 03:30:24 +0500 Subject: [PATCH] Revert "engine: voice: unconditionally notify client.dll about talking player if we received the data" This reverts commit 9fda7a15cb967a5109e335ad0f48d80fdde4df0e. --- engine/client/voice.c | 7 ++++--- engine/client/voice.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/engine/client/voice.c b/engine/client/voice.c index 55b610e3..6ea7c015 100644 --- a/engine/client/voice.c +++ b/engine/client/voice.c @@ -79,7 +79,7 @@ Does proper entity index range checking and helps to avoid mess with off-by-one */ static voice_status_t *Voice_GetPlayerStatus( int playerent ) { - if( playerent < 1 || playerent > MAX_CLIENTS ) + if ( playerent < 1 || playerent > MAX_CLIENTS ) { Con_Printf( S_ERROR "%s: detected out-of-range player entity index\n", __func__ ); return NULL; @@ -832,9 +832,10 @@ Sends notification to user dll and zeroes timeouts for this client ========================= */ -static void Voice_StatusAck( voice_status_t *status, int playerIndex ) +void Voice_StatusAck( voice_status_t *status, int playerIndex ) { - Voice_Status( playerIndex, true ); + if( !status->talking_ack ) + Voice_Status( playerIndex, true ); status->talking_ack = true; status->talking_timeout = 0.0; diff --git a/engine/client/voice.h b/engine/client/voice.h index 894f619d..5668009b 100644 --- a/engine/client/voice.h +++ b/engine/client/voice.h @@ -130,6 +130,7 @@ void Voice_RecordStop( void ); void Voice_RecordStart( void ); void Voice_Disconnect( void ); void Voice_AddIncomingData( int ent, const byte *data, uint size, uint frames ); +void Voice_StatusAck( voice_status_t *status, int playerIndex ); void Voice_StartChannel( uint samples, byte *data, int entnum ); #endif // VOICE_H