Browse Source

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

master
Alibek Omarov 9 months ago
parent
commit
1f4c9b67da
  1. 2
      engine/server/sv_client.c
  2. 3
      engine/server/sv_init.c

2
engine/server/sv_client.c

@ -3458,7 +3458,7 @@ static void SV_ParseVoiceData( sv_client_t *cl, sizebuf_t *msg ) @@ -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++ )

3
engine/server/sv_init.c

@ -469,7 +469,8 @@ static void SV_CreateBaseline( void ) @@ -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 );

Loading…
Cancel
Save