/*
=====================================================================
SERVER CONNECTING MESSAGES
=====================================================================
*/
/*
==================
CL_ParseServerData
==================
*/
void CL_ParseServerData (void)
{
char *str;
FILE *f;
char fn[MAX_OSPATH];
qboolean cflag = false;
extern char gamedirfile[MAX_OSPATH];
int protover;
Con_DPrintf ("Serverdata packet received.\n");
//
// wipe the client_state_t struct
//
CL_ClearState ();
// parse protocol version number
// allow 2.2 and 2.29 demos to play
protover = MSG_ReadLong ();
if (protover != PROTOCOL_VERSION &&
!(cls.demoplayback && (protover == 26 || protover == 27 || protover == 28)))
Host_EndGame ("Server returned version %i, not %i\nYou probably need to upgrade.\nCheck
http://www.quakeworld.net/", protover, PROTOCOL_VERSION);
cl.servercount = MSG_ReadLong ();
// game directory
str = MSG_ReadString ();
if (stricmp(gamedirfile, str)) {
// save current config
Host_WriteConfiguration ();
cflag = true;
}