Fixed Molgrum's QTV lockup problem (hopefully).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2648 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
c9db676754
commit
12f0564d1d
2 changed files with 12 additions and 4 deletions
|
@ -1247,7 +1247,7 @@ void MVDWrite_Begin(qbyte type, int to, int size);
|
||||||
void MVDSetMsgBuf(demobuf_t *prev,demobuf_t *cur);
|
void MVDSetMsgBuf(demobuf_t *prev,demobuf_t *cur);
|
||||||
void SV_MVDStop (int reason, qboolean mvdonly);
|
void SV_MVDStop (int reason, qboolean mvdonly);
|
||||||
void SV_MVDStop_f (void);
|
void SV_MVDStop_f (void);
|
||||||
void SV_MVDWritePackets (int num);
|
qboolean SV_MVDWritePackets (int num);
|
||||||
void MVD_Init (void);
|
void MVD_Init (void);
|
||||||
void SV_MVD_RunPendingConnections(void);
|
void SV_MVD_RunPendingConnections(void);
|
||||||
void SV_MVD_SendInitialGamestate(mvddest_t *dest);
|
void SV_MVD_SendInitialGamestate(mvddest_t *dest);
|
||||||
|
|
|
@ -1021,7 +1021,9 @@ void MVDWrite_Begin(qbyte type, int to, int size)
|
||||||
if (!move && demobuffer->end > demobuffer->start)
|
if (!move && demobuffer->end > demobuffer->start)
|
||||||
move = true;
|
move = true;
|
||||||
|
|
||||||
SV_MVDWritePackets(1);
|
if (!SV_MVDWritePackets(1))
|
||||||
|
return;
|
||||||
|
|
||||||
if (move && demobuffer->start > demo.dbuf->bufsize + header + size)
|
if (move && demobuffer->start > demo.dbuf->bufsize + header + size)
|
||||||
MVDMoveBuf();
|
MVDMoveBuf();
|
||||||
}
|
}
|
||||||
|
@ -1153,7 +1155,7 @@ float adjustangle(float current, float ideal, float fraction)
|
||||||
#define DF_WEAPONFRAME (1<<10)
|
#define DF_WEAPONFRAME (1<<10)
|
||||||
#define DF_MODEL (1<<11)
|
#define DF_MODEL (1<<11)
|
||||||
|
|
||||||
void SV_MVDWritePackets (int num)
|
qboolean SV_MVDWritePackets (int num)
|
||||||
{
|
{
|
||||||
demo_frame_t *frame, *nextframe;
|
demo_frame_t *frame, *nextframe;
|
||||||
demo_client_t *cl, *nextcl = NULL;
|
demo_client_t *cl, *nextcl = NULL;
|
||||||
|
@ -1167,7 +1169,7 @@ void SV_MVDWritePackets (int num)
|
||||||
demoinfo_t *demoinfo;
|
demoinfo_t *demoinfo;
|
||||||
|
|
||||||
if (!sv.mvdrecording)
|
if (!sv.mvdrecording)
|
||||||
return;
|
return false;
|
||||||
|
|
||||||
msg.data = msg_buf;
|
msg.data = msg_buf;
|
||||||
msg.maxsize = sizeof(msg_buf);
|
msg.maxsize = sizeof(msg_buf);
|
||||||
|
@ -1295,6 +1297,10 @@ void SV_MVDWritePackets (int num)
|
||||||
SV_MVDWriteToDisk(0,0, (float)time); // now goes the rest
|
SV_MVDWriteToDisk(0,0, (float)time); // now goes the rest
|
||||||
if (msg.cursize)
|
if (msg.cursize)
|
||||||
SV_WriteMVDMessage(&msg, dem_all, 0, (float)time);
|
SV_WriteMVDMessage(&msg, dem_all, 0, (float)time);
|
||||||
|
|
||||||
|
/* The above functions can set this variable to false, but that's a really bad thing. Let's try to fix it. */
|
||||||
|
if (!sv.mvdrecording)
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (demo.lastwritten > demo.parsecount)
|
if (demo.lastwritten > demo.parsecount)
|
||||||
|
@ -1302,6 +1308,8 @@ void SV_MVDWritePackets (int num)
|
||||||
|
|
||||||
demo.dbuf = &demo.frames[demo.parsecount&DEMO_FRAMES_MASK].buf;
|
demo.dbuf = &demo.frames[demo.parsecount&DEMO_FRAMES_MASK].buf;
|
||||||
demo.dbuf->maxsize = MAXSIZE + demo.dbuf->bufsize;
|
demo.dbuf->maxsize = MAXSIZE + demo.dbuf->bufsize;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern char readable[256];
|
extern char readable[256];
|
||||||
|
|
Loading…
Reference in a new issue