avoid setting cvars by name each frame

This commit is contained in:
Ludwig Nussel 2010-01-06 13:47:41 +00:00
parent 9b1a3387cb
commit 6f9b34ef75
5 changed files with 22 additions and 13 deletions

View file

@ -366,7 +366,11 @@ void CL_SystemInfoChanged( void ) {
// in the future, (val) will be a protocol version string, so only
// accept explicitly 1, not generally non-zero.
s = Info_ValueForKey( systemInfo, "sv_voip" );
cl_connectedToVoipServer = (atoi( s ) == 1);
if ( Cvar_VariableValue( "g_gametype" ) == GT_SINGLE_PLAYER || Cvar_VariableValue("ui_singlePlayerActive"))
cl_connectedToVoipServer = qfalse;
else
cl_connectedToVoipServer = (atoi( s ) == 1);
#endif
s = Info_ValueForKey( systemInfo, "sv_cheats" );