================== 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. ================== */
| 325 | ================== |
| 326 | */ |
| 327 | void 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 | |
| 359 | void UI_UpdateConnectionString( const char *string ); |
| 360 |
no test coverage detected