MCPcopy Create free account
hub / github.com/JACoders/OpenJK / CL_SystemInfoChanged

Function CL_SystemInfoChanged

code/client/cl_parse.cpp:327–357  ·  view source on GitHub ↗

================== CL_SystemInfoChanged The systeminfo configstring has been changed, so parse new information out of it. This will happen at every gamestate, and possibly during gameplay. ================== */

Source from the content-addressed store, hash-verified

325==================
326*/
327void CL_SystemInfoChanged( void ) {
328 char *systemInfo;
329 const char *s;
330 char key[MAX_INFO_KEY];
331 char value[MAX_INFO_VALUE];
332
333 systemInfo = cl.gameState.stringData + cl.gameState.stringOffsets[ CS_SYSTEMINFO ];
334 cl.serverId = atoi( Info_ValueForKey( systemInfo, "sv_serverid" ) );
335
336 s = Info_ValueForKey( systemInfo, "helpUsObi" );
337 cl_connectedToCheatServer = atoi( s );
338 if ( !cl_connectedToCheatServer )
339 {
340 Cvar_SetCheatState();
341 }
342
343 // scan through all the variables in the systeminfo and locally set cvars to match
344 s = systemInfo;
345 while ( s ) {
346 Info_NextPair( &s, key, value );
347 if ( !key[0] ) {
348 break;
349 }
350
351 Cvar_Set( key, value );
352 }
353 //if ( Cvar_VariableIntegerValue("ui_iscensored") == 1 )
354 //{
355 // Cvar_Set( "g_dismemberment", "0");
356 //}
357}
358
359void UI_UpdateConnectionString( const char *string );
360

Callers 2

CL_ParseGamestateFunction · 0.70
CL_ConfigstringModifiedFunction · 0.70

Calls 4

Info_ValueForKeyFunction · 0.50
Cvar_SetCheatStateFunction · 0.50
Info_NextPairFunction · 0.50
Cvar_SetFunction · 0.50

Tested by

no test coverage detected