Browse Source

engine: server: added support for variable voice chat quality

pull/2/head
SNMetamorph 2 years ago committed by Alibek Omarov
parent
commit
8d0209b122
  1. 2
      engine/server/sv_init.c
  2. 2
      engine/server/sv_main.c

2
engine/server/sv_init.c

@ -395,7 +395,7 @@ void SV_WriteVoiceCodec( sizebuf_t *msg )
{ {
MSG_BeginServerCmd( msg, svc_voiceinit ); MSG_BeginServerCmd( msg, svc_voiceinit );
MSG_WriteString( msg, "opus" ); MSG_WriteString( msg, "opus" );
MSG_WriteByte( msg, 0 ); MSG_WriteByte( msg, Cvar_VariableInteger( "sv_voicequality" ));
} }
/* /*

2
engine/server/sv_main.c

@ -114,6 +114,7 @@ CVAR_DEFINE_AUTO( violence_agibs, "1", 0, "show alien gib entities" );
// voice chat // voice chat
CVAR_DEFINE_AUTO( sv_voiceenable, "1", FCVAR_ARCHIVE|FCVAR_SERVER, "enable voice support" ); CVAR_DEFINE_AUTO( sv_voiceenable, "1", FCVAR_ARCHIVE|FCVAR_SERVER, "enable voice support" );
CVAR_DEFINE_AUTO( sv_voicequality, "3", FCVAR_ARCHIVE|FCVAR_SERVER, "voice chat quality level, from 0 to 5, higher is better" );
convar_t *sv_novis; // disable server culling entities by vis convar_t *sv_novis; // disable server culling entities by vis
convar_t *sv_pausable; convar_t *sv_pausable;
@ -978,6 +979,7 @@ void SV_Init( void )
Cvar_RegisterVariable( &mapchangecfgfile ); Cvar_RegisterVariable( &mapchangecfgfile );
Cvar_RegisterVariable( &sv_voiceenable ); Cvar_RegisterVariable( &sv_voiceenable );
Cvar_RegisterVariable( &sv_voicequality );
Cvar_RegisterVariable( &sv_trace_messages ); Cvar_RegisterVariable( &sv_trace_messages );
sv_allow_joystick = Cvar_Get( "sv_allow_joystick", "1", FCVAR_ARCHIVE, "allow connect with joystick enabled" ); sv_allow_joystick = Cvar_Get( "sv_allow_joystick", "1", FCVAR_ARCHIVE, "allow connect with joystick enabled" );

Loading…
Cancel
Save