engine: server: don't init or send voice chat in singleplayer

This commit is contained in:
Alibek Omarov 2024-02-13 15:09:22 +03:00
parent c2da125358
commit 1f4c9b67da
2 changed files with 3 additions and 2 deletions

View File

@ -3458,7 +3458,7 @@ static void SV_ParseVoiceData( sv_client_t *cl, sizebuf_t *msg )
MSG_ReadBytes( msg, received, size );
if( !sv_voiceenable.value )
if( !sv_voiceenable.value || svs.maxclients <= 1 )
return;
for( i = 0, cur = svs.clients; i < svs.maxclients; i++, cur++ )

View File

@ -469,7 +469,8 @@ static void SV_CreateBaseline( void )
int delta_type;
int entnum;
SV_WriteVoiceCodec( &sv.signon );
if( svs.maxclients > 1 )
SV_WriteVoiceCodec( &sv.signon );
if( FBitSet( host.features, ENGINE_QUAKE_COMPATIBLE ))
playermodel = SV_ModelIndex( DEFAULT_PLAYER_PATH_QUAKE );