avoid setting cvars by name each frame

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

No files matched your search

+5 -1
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" );