PROTOCOL_VERSION to PROTOCOL_VERSION_QW to resolve a future header conflict

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2940 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2008-04-12 23:24:19 +00:00
parent ece33d0b2a
commit 1673ca7a7a
7 changed files with 13 additions and 13 deletions

View File

@ -1033,7 +1033,7 @@ void CL_Record_f (void)
MSG_WriteLong (&buf, cls.fteprotocolextensions);
}
#endif
MSG_WriteLong (&buf, PROTOCOL_VERSION);
MSG_WriteLong (&buf, PROTOCOL_VERSION_QW);
MSG_WriteLong (&buf, cl.servercount);
MSG_WriteString (&buf, gamedirfile);

View File

@ -499,7 +499,7 @@ void CL_SendConnectPacket (
Q_strncatz(data, va(" %i", PROTOCOL_VERSION_Q2), sizeof(data));
else
#endif
Q_strncatz(data, va(" %i", PROTOCOL_VERSION), sizeof(data));
Q_strncatz(data, va(" %i", PROTOCOL_VERSION_QW), sizeof(data));
Q_strncatz(data, va(" %i %i", cls.qport, cls.challenge), sizeof(data));

View File

@ -1646,17 +1646,17 @@ void CL_ParseServerData (void)
Con_TPrintf (TL_FTEEXTENSIONS, cls.fteprotocolextensions);
continue;
}
if (protover == PROTOCOL_VERSION) //this ends the version info
if (protover == PROTOCOL_VERSION_QW) //this ends the version info
break;
if (cls.demoplayback && (protover == 26 || protover == 27 || protover == 28)) //older versions, maintain demo compatability.
break;
Host_EndGame ("Server returned version %i, not %i\nYou probably need to upgrade.\nCheck http://www.quakeworld.net/", protover, PROTOCOL_VERSION);
Host_EndGame ("Server returned version %i, not %i\n", protover, PROTOCOL_VERSION_QW);
}
#else
protover = MSG_ReadLong ();
if (protover != PROTOCOL_VERSION &&
if (protover != PROTOCOL_VERSION_QW &&
!(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);
Host_EndGame ("Server returned version %i, not %i\n", protover, PROTOCOL_VERSION_QW);
#endif
if (cls.fteprotocolextensions & PEXT_FLOATCOORDS)

View File

@ -85,9 +85,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define PROTOCOL_VERSION_FTE (('F'<<0) + ('T'<<8) + ('E'<<16) + ('X' << 24)) //fte extensions.
#define PROTOCOL_VERSION_HUFFMAN (('H'<<0) + ('U'<<8) + ('F'<<16) + ('F' << 24)) //packet compression
#define PROTOCOL_VERSION 28
#define PROTOCOL_VERSION_Q2_MIN 31
#define PROTOCOL_VERSION_Q2 34
#define PROTOCOL_VERSION_QW 28
#define PROTOCOL_VERSION_Q2_MIN 31
#define PROTOCOL_VERSION_Q2 34
//=========================================

View File

@ -1556,9 +1556,9 @@ client_t *SVC_DirectConnect(void)
numssclients = 1;
protocol = SCP_NETQUAKE;
}
else if (version != PROTOCOL_VERSION)
else if (version != PROTOCOL_VERSION_QW)
{
SV_RejectMessage (SCP_BAD, "Server is protocol version %i, received %i\n", PROTOCOL_VERSION, version);
SV_RejectMessage (SCP_BAD, "Server is protocol version %i, received %i\n", PROTOCOL_VERSION_QW, version);
Con_Printf ("* rejected connect from version %i\n", version);
return NULL;
}

View File

@ -1731,7 +1731,7 @@ void SV_MVD_SendInitialGamestate(mvddest_t *dest)
MSG_WriteLong (&buf, PROTOCOL_VERSION_FTE);
MSG_WriteLong (&buf, PEXT_FLOATCOORDS);
}
MSG_WriteLong (&buf, PROTOCOL_VERSION);
MSG_WriteLong (&buf, PROTOCOL_VERSION_QW);
MSG_WriteLong (&buf, svs.spawncount);
MSG_WriteString (&buf, gamedir);

View File

@ -227,7 +227,7 @@ void SV_New_f (void)
MSG_WriteLong (&host_client->netchan.message, host_client->fteprotocolextensions);
}
#endif
ClientReliableWrite_Long (host_client, ISQ2CLIENT(host_client)?PROTOCOL_VERSION_Q2:PROTOCOL_VERSION);
ClientReliableWrite_Long (host_client, ISQ2CLIENT(host_client)?PROTOCOL_VERSION_Q2:PROTOCOL_VERSION_QW);
ClientReliableWrite_Long (host_client, svs.spawncount);
if (ISQ2CLIENT(host_client))
ClientReliableWrite_Byte (host_client, 0);