From 3bf676b1bb5ae7887e7a5f8d9a76b1577b0a5b9b Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 25 May 2008 01:17:16 +0000 Subject: [PATCH] Improvements for using FTE as a Q2 client. Helps connecting to r1q2 servers (tastyspleen being an example). git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2969 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 93aebadcc..7af3c5c1b 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -505,7 +505,10 @@ void CL_SendConnectPacket ( Q_strncatz(data, va(" %i %i", cls.qport, cls.challenge), sizeof(data)); //userinfo 0 + zquake extension info. - Q_strncatz(data, va(" \"%s\\*z_ext\\%i\"", cls.userinfo, SUPPORTED_Z_EXTENSIONS), sizeof(data)); + if (cls.protocol == CP_QUAKEWORLD) + Q_strncatz(data, va(" \"%s\\*z_ext\\%i\"", cls.userinfo, SUPPORTED_Z_EXTENSIONS), sizeof(data)); + else + Q_strncatz(data, va(" \"%s\"", cls.userinfo), sizeof(data)); for (c = 1; c < clients; c++) { Info_SetValueForStarKey (playerinfo2, "name", va("%s%i", name.string, c+1), MAX_INFO_STRING); @@ -2060,7 +2063,7 @@ void CL_ConnectionlessPacket (void) if ((*s2 < '0' || *s2 > '9') && *s2 != '-') break; } - if (*s2) + if (*s2 && *s2 != ' ') {//and if it's not, we're unlikly to be compatible with whatever it is that's talking at us. #ifdef NQPROT if (cls.protocol == CP_NETQUAKE || cls.protocol == CP_UNKNOWN) @@ -2139,6 +2142,7 @@ void CL_ConnectionlessPacket (void) if (nl) { msg_readcount = c + nl-s + 1; + msg_badread = false; *nl = '\0'; }