engine: client: voice: rewrite Voice_IsGoldSrcMode to make it easier to understand and also fix build with Clang

This commit is contained in:
Alibek Omarov
2026-02-21 00:43:47 +05:00
committed by a1batross
parent 6bcb98e779
commit 9205ddc5b4

View File

@@ -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;
}
/*