Fixing Molgrum's QTV problems, part two.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2650 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Mark Olsen 2007-09-10 14:55:36 +00:00
parent 571412b66f
commit 5a512f2c43
3 changed files with 10 additions and 4 deletions

View File

@ -1243,7 +1243,7 @@ typedef struct mvddest_s {
} mvddest_t;
void SV_MVDPings (void);
void SV_MVDWriteToDisk(int type, int to, float time);
void MVDWrite_Begin(qbyte type, int to, int size);
qboolean MVDWrite_Begin(qbyte type, int to, int size);
void MVDSetMsgBuf(demobuf_t *prev,demobuf_t *cur);
void SV_MVDStop (int reason, qboolean mvdonly);
void SV_MVDStop_f (void);

View File

@ -1009,7 +1009,7 @@ void MVDMoveBuf(void)
demo.dbuf->maxsize = MAXSIZE + demo.dbuf->bufsize;
}
void MVDWrite_Begin(qbyte type, int to, int size)
qboolean MVDWrite_Begin(qbyte type, int to, int size)
{
qbyte *p;
qboolean move = false;
@ -1022,7 +1022,7 @@ void MVDWrite_Begin(qbyte type, int to, int size)
move = true;
if (!SV_MVDWritePackets(1))
return;
return false;
if (move && demobuffer->start > demo.dbuf->bufsize + header + size)
MVDMoveBuf();
@ -1048,6 +1048,8 @@ void MVDWrite_Begin(qbyte type, int to, int size)
demo.dbuf->h->size += size;
if ((demobuffer->end += size) > demobuffer->last)
demobuffer->last = demobuffer->end;
return true;
}
/*

View File

@ -2073,8 +2073,12 @@ void SV_SendMVDMessage(void)
msg.cursize = 0;
if (!demo.recorder.delta_sequence)
demo.recorder.delta_sequence = -1;
SV_WriteEntitiesToClient (&demo.recorder, &msg, true);
MVDWrite_Begin(dem_all, 0, msg.cursize);
if (!MVDWrite_Begin(dem_all, 0, msg.cursize))
return;
SZ_Write ((sizebuf_t*)demo.dbuf, msg.data, msg.cursize);
// copy the accumulated multicast datagram
// for this client out to the message