From 9205ddc5b4e1887c0d30a7c5364a37225e49cdf3 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 21 Feb 2026 00:43:47 +0500 Subject: [PATCH] engine: client: voice: rewrite Voice_IsGoldSrcMode to make it easier to understand and also fix build with Clang --- engine/client/voice.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engine/client/voice.c b/engine/client/voice.c index 8bc186d1..c0ddfc5a 100644 --- a/engine/client/voice.c +++ b/engine/client/voice.c @@ -56,7 +56,13 @@ static qboolean Voice_IsGoldSrcMode( const char *codec ) // it will send an empty codec // however, decoding is still possible // if the voice data contains Opus - return( !COM_StringEmptyOrNULL( codec ) == 0 || Q_strstr( codec, "voice_speex" ) != NULL ); + if( COM_StringEmptyOrNULL( codec )) + return true; + + if( Q_strstr( codec, "voice_speex" )) + return true; + + return false; } /*