r1357 - trunk/code/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Jun 2 15:41:09 EDT 2008
Author: icculus
Date: 2008-06-02 15:41:09 -0400 (Mon, 02 Jun 2008)
New Revision: 1357
Modified:
trunk/code/server/sv_init.c
trunk/code/server/sv_main.c
Log:
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.
Modified: trunk/code/server/sv_init.c
===================================================================
--- trunk/code/server/sv_init.c 2008-06-02 19:37:05 UTC (rev 1356)
+++ trunk/code/server/sv_init.c 2008-06-02 19:41:09 UTC (rev 1357)
@@ -656,6 +656,10 @@
sv_pure = Cvar_Get ("sv_pure", "1", CVAR_SYSTEMINFO );
#if USE_VOIP
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
Cvar_Get ("sv_paks", "", CVAR_SYSTEMINFO | CVAR_ROM );
Cvar_Get ("sv_pakNames", "", CVAR_SYSTEMINFO | CVAR_ROM );
Modified: trunk/code/server/sv_main.c
===================================================================
--- trunk/code/server/sv_main.c 2008-06-02 19:37:05 UTC (rev 1356)
+++ trunk/code/server/sv_main.c 2008-06-02 19:41:09 UTC (rev 1357)
@@ -412,7 +412,9 @@
Info_SetValueForKey( infostring, "pure", va("%i", sv_pure->integer ) );
#if USE_VOIP
- Info_SetValueForKey( infostring, "voip", va("%i", sv_voip->integer ) );
+ if (sv_voip->integer) {
+ Info_SetValueForKey( infostring, "voip", va("%i", sv_voip->integer ) );
+ }
#endif
if( sv_minPing->integer ) {
More information about the quake3-commits
mailing list