Prints some proquake server info, refuses to connect to pure proquake servers, and flushes clientcommands when connecting to new servers.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1478 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
b7d963b039
commit
15c0cda73e
|
@ -518,6 +518,8 @@ void CL_CheckForResend (void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CL_FlushClientCommands(); //clear away all client->server clientcommands.
|
||||||
|
|
||||||
CL_SendConnectPacket (svs.fteprotocolextensions, false);
|
CL_SendConnectPacket (svs.fteprotocolextensions, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2003,6 +2005,19 @@ void CLNQ_ConnectionlessPacket(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
net_from.port = htons((short)MSG_ReadLong());
|
net_from.port = htons((short)MSG_ReadLong());
|
||||||
|
|
||||||
|
if (MSG_ReadByte() == 1) //a proquake server adds a little extra info
|
||||||
|
{
|
||||||
|
int ver = MSG_ReadByte();
|
||||||
|
Con_Printf("ProQuake server %i.%i\n", ver/10, ver%10);
|
||||||
|
|
||||||
|
if (MSG_ReadByte() == 1)
|
||||||
|
{
|
||||||
|
Con_Printf("ProQuake sucks\nGo play on a decent server.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Netchan_Setup (NS_CLIENT, &cls.netchan, net_from, cls.qport);
|
Netchan_Setup (NS_CLIENT, &cls.netchan, net_from, cls.qport);
|
||||||
cls.netchan.isnqprotocol = true;
|
cls.netchan.isnqprotocol = true;
|
||||||
cls.netchan.compress = 0;
|
cls.netchan.compress = 0;
|
||||||
|
@ -2013,7 +2028,7 @@ void CLNQ_ConnectionlessPacket(void)
|
||||||
|
|
||||||
//send a dummy packet.
|
//send a dummy packet.
|
||||||
//this makes our local nat think we initialised the conversation.
|
//this makes our local nat think we initialised the conversation.
|
||||||
NET_SendPacket(NS_CLIENT, 9, "\xff\xff\xff\xff""dummy", net_from);
|
NET_SendPacket(NS_CLIENT, 0, "", net_from);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CCREP_REJECT:
|
case CCREP_REJECT:
|
||||||
|
|
Loading…
Reference in New Issue