mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-23 04:11:53 +00:00
ignore challanges from differing protocols (happens with a client connecting to an sv_listen 2 server)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2367 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
0d6e663d60
commit
fc3af4e938
1 changed files with 31 additions and 7 deletions
|
@ -1919,9 +1919,17 @@ void CL_ConnectionlessPacket (void)
|
|||
if (!strcmp(com_token, "hallengeResponse"))
|
||||
{
|
||||
#ifdef Q3CLIENT
|
||||
cls.protocol = CP_QUAKE3;
|
||||
cls.challenge = atoi(s+17);
|
||||
CL_SendConnectPacket (0, 0/*, ...*/);
|
||||
if (cls.protocol == CP_QUAKE3 || cls.protocol == CP_UNKNOWN)
|
||||
{
|
||||
cls.protocol = CP_QUAKE3;
|
||||
cls.challenge = atoi(s+17);
|
||||
CL_SendConnectPacket (0, 0/*, ...*/);
|
||||
}
|
||||
else
|
||||
{
|
||||
Con_Printf("\nChallange from another protocol, ignoring Q3 challange\n");
|
||||
return;
|
||||
}
|
||||
return;
|
||||
#else
|
||||
Con_Printf("\nUnable to connect to Quake3\n");
|
||||
|
@ -1939,8 +1947,13 @@ void CL_ConnectionlessPacket (void)
|
|||
if (*s2)
|
||||
{//and if it's not, we're unlikly to be compatable with whatever it is that's talking at us.
|
||||
#ifdef NQPROT
|
||||
cls.protocol = CP_NETQUAKE;
|
||||
CL_ConnectToDarkPlaces(s+9, net_from);
|
||||
if (cls.protocol == CP_NETQUAKE || cls.protocol == CP_UNKNOWN)
|
||||
{
|
||||
cls.protocol = CP_NETQUAKE;
|
||||
CL_ConnectToDarkPlaces(s+9, net_from);
|
||||
}
|
||||
else
|
||||
Con_Printf("\nChallange from another protocol, ignoring DP challange\n");
|
||||
#else
|
||||
Con_Printf("\nUnable connect to DarkPlaces\n");
|
||||
#endif
|
||||
|
@ -1948,7 +1961,13 @@ void CL_ConnectionlessPacket (void)
|
|||
}
|
||||
|
||||
#ifdef Q2CLIENT
|
||||
cls.protocol = CP_QUAKE2;
|
||||
if (cls.protocol == CP_QUAKE2 || cls.protocol == CP_UNKNOWN)
|
||||
cls.protocol = CP_QUAKE2;
|
||||
else
|
||||
{
|
||||
Con_Printf("\nChallange from another protocol, ignoring Q2 challange\n");
|
||||
return;
|
||||
}
|
||||
#else
|
||||
Con_Printf("\nUnable to connect to Quake2\n");
|
||||
#endif
|
||||
|
@ -1966,8 +1985,13 @@ void CL_ConnectionlessPacket (void)
|
|||
goto client_connect;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
else if (cls.protocol == CP_QUAKEWORLD || cls.protocol == CP_UNKNOWN)
|
||||
cls.protocol = CP_QUAKEWORLD;
|
||||
else
|
||||
{
|
||||
Con_Printf("\nChallange from another protocol, ignoring QW challange\n");
|
||||
return;
|
||||
}
|
||||
cls.challenge = atoi(s);
|
||||
|
||||
for(;;)
|
||||
|
|
Loading…
Reference in a new issue