diff options
Diffstat (limited to 'code/client/cl_parse.c')
-rw-r--r-- | code/client/cl_parse.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/code/client/cl_parse.c b/code/client/cl_parse.c index d8ad6d7..3039849 100644 --- a/code/client/cl_parse.c +++ b/code/client/cl_parse.c @@ -414,6 +414,25 @@ void CL_SystemInfoChanged( void ) { /* ================== +CL_ParseServerInfo +================== +*/ +static void CL_ParseServerInfo(void) +{ + const char *serverInfo; + + serverInfo = cl.gameState.stringData + + cl.gameState.stringOffsets[ CS_SERVERINFO ]; + + clc.sv_allowDownload = atoi(Info_ValueForKey(serverInfo, + "sv_allowDownload")); + Q_strncpyz(clc.sv_dlURL, + Info_ValueForKey(serverInfo, "sv_dlURL"), + sizeof(clc.sv_dlURL)); +} + +/* +================== CL_ParseGamestate ================== */ @@ -479,6 +498,9 @@ void CL_ParseGamestate( msg_t *msg ) { // read the checksum feed clc.checksumFeed = MSG_ReadLong( msg ); + // parse useful values out of CS_SERVERINFO + CL_ParseServerInfo(); + // parse serverId and other cvars CL_SystemInfoChanged(); |