mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-25 13:21:36 +00:00
Fixed a couple of qtvplay bugs
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2811 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
9847a8213b
commit
81b91a422d
2 changed files with 11 additions and 1 deletions
|
@ -216,7 +216,15 @@ int readdemobytes(int *readpos, void *data, int len)
|
|||
int trybytes;
|
||||
|
||||
if (demopreparsedbytes < 0) //won't happen in normal running, but can still happen on corrupt data... if we don't disconnect first.
|
||||
{
|
||||
Con_Printf("reset preparsed (underflow)\n");
|
||||
demopreparsedbytes = 0;
|
||||
}
|
||||
if (demopreparsedbytes > demobuffersize)
|
||||
{
|
||||
Con_Printf("reset preparsed (overflow)\n");
|
||||
demopreparsedbytes = 0;
|
||||
}
|
||||
|
||||
trybytes = sizeof(demobuffer)-demobuffersize;
|
||||
|
||||
|
@ -264,6 +272,7 @@ void demo_resetcache(int bytes, void *data)
|
|||
demo_flushcache();
|
||||
|
||||
demobuffersize = bytes;
|
||||
demopreparsedbytes = 0;
|
||||
memcpy(demobuffer, data, bytes);
|
||||
|
||||
//preparse it now
|
||||
|
@ -1500,6 +1509,7 @@ void CL_QTVPoll (void)
|
|||
}
|
||||
if (!*s)
|
||||
return;
|
||||
s[1] = '\0'; //make sure its null terminated before the data payload
|
||||
s = qtvrequestbuffer;
|
||||
for (e = s; *e; )
|
||||
{
|
||||
|
|
|
@ -331,7 +331,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define MAX_NQMSGLEN 8000 // max length of a reliable message
|
||||
#define MAX_Q2MSGLEN 1400
|
||||
#define MAX_QWMSGLEN 1450
|
||||
#define MAX_OVERALLMSGLEN MAX_NQMSGLEN
|
||||
#define MAX_OVERALLMSGLEN 8192 // mvdsv sends packets this big
|
||||
#define MAX_DATAGRAM 1450 // max length of unreliable message
|
||||
#define MAX_Q2DATAGRAM MAX_Q2MSGLEN
|
||||
#define MAX_NQDATAGRAM 1024 // max length of unreliable message
|
||||
|
|
Loading…
Reference in a new issue