mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-14 06:01:10 +00:00
Treat sv_voip cvar as a version number (0 == off, 1 == version 1 protocol).
Don't publish it to server's info string if set to zero.
This commit is contained in:
parent
953e9ec287
commit
1e4fa5a54c
2 changed files with 7 additions and 1 deletions
|
@ -656,6 +656,10 @@ void SV_Init (void) {
|
||||||
sv_pure = Cvar_Get ("sv_pure", "1", CVAR_SYSTEMINFO );
|
sv_pure = Cvar_Get ("sv_pure", "1", CVAR_SYSTEMINFO );
|
||||||
#if USE_VOIP
|
#if USE_VOIP
|
||||||
sv_voip = Cvar_Get ("sv_voip", "1", CVAR_SYSTEMINFO | CVAR_LATCH);
|
sv_voip = Cvar_Get ("sv_voip", "1", CVAR_SYSTEMINFO | CVAR_LATCH);
|
||||||
|
if ( (sv_voip->integer < 0) || (sv_voip->integer > 1) ) {
|
||||||
|
Com_Printf("WARNING: sv_voip must be 0 or 1. Setting to 1.");
|
||||||
|
Cvar_Set ("sv_voip", "1");
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
Cvar_Get ("sv_paks", "", CVAR_SYSTEMINFO | CVAR_ROM );
|
Cvar_Get ("sv_paks", "", CVAR_SYSTEMINFO | CVAR_ROM );
|
||||||
Cvar_Get ("sv_pakNames", "", CVAR_SYSTEMINFO | CVAR_ROM );
|
Cvar_Get ("sv_pakNames", "", CVAR_SYSTEMINFO | CVAR_ROM );
|
||||||
|
|
|
@ -412,7 +412,9 @@ void SVC_Info( netadr_t from ) {
|
||||||
Info_SetValueForKey( infostring, "pure", va("%i", sv_pure->integer ) );
|
Info_SetValueForKey( infostring, "pure", va("%i", sv_pure->integer ) );
|
||||||
|
|
||||||
#if USE_VOIP
|
#if USE_VOIP
|
||||||
|
if (sv_voip->integer) {
|
||||||
Info_SetValueForKey( infostring, "voip", va("%i", sv_voip->integer ) );
|
Info_SetValueForKey( infostring, "voip", va("%i", sv_voip->integer ) );
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( sv_minPing->integer ) {
|
if( sv_minPing->integer ) {
|
||||||
|
|
Loading…
Reference in a new issue