cl_parse.c (CL_KeepaliveMessage): fixed big boom in net play in maps with

extended limits. it was a fitzquake-0.85 bug noticed by `mh' as explained
at http://forums.inside3d.com/viewtopic.php?p=35030

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@440 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2011-04-08 06:01:39 +00:00
parent 7851cda724
commit 46f0616a0b
1 changed files with 3 additions and 1 deletions

View File

@ -192,13 +192,14 @@ When the client is taking a long time to load stuff, send keepalive messages
so the server doesn't disconnect. so the server doesn't disconnect.
================== ==================
*/ */
static byte net_olddata[NET_MAXMESSAGE];
void CL_KeepaliveMessage (void) void CL_KeepaliveMessage (void)
{ {
float time; float time;
static float lastmsg; static float lastmsg;
int ret; int ret;
sizebuf_t old; sizebuf_t old;
byte olddata[8192]; byte *olddata;
if (sv.active) if (sv.active)
return; // no need if server is local return; // no need if server is local
@ -206,6 +207,7 @@ void CL_KeepaliveMessage (void)
return; return;
// read messages from server, should just be nops // read messages from server, should just be nops
olddata = net_olddata;
old = net_message; old = net_message;
memcpy (olddata, net_message.data, net_message.cursize); memcpy (olddata, net_message.data, net_message.cursize);