mingl fixes.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4541 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2013-11-28 01:38:33 +00:00
parent 75ef62b6f3
commit a1a78d787f

View file

@ -1646,11 +1646,6 @@ void CL_PlayDemoStream(vfsfile_t *file, struct dl_download *dl, char *filename,
void CL_PlayDemo(char *demoname)
{
char name[256];
int ft, neg = false;
int len;
char type;
char chr;
int protocol;
int start;
vfsfile_t *f;
@ -1701,6 +1696,10 @@ void CL_PlayDemo(char *demoname)
start = VFS_TELL(f);
#ifdef Q2CLIENT
{
int len;
char type;
int protocol;
//check if its a quake2 demo.
VFS_READ(f, &len, sizeof(len));
VFS_READ(f, &type, sizeof(type));
@ -1711,11 +1710,15 @@ void CL_PlayDemo(char *demoname)
CL_PlayDemoStream(f, NULL, name, DPB_QUAKE2, 0);
return;
}
}
#endif
#ifdef NQPROT
{
int ft = 0, neg = false;
char chr;
//not quake2, check if its NQ
ft = 0; //work out if the first line is a int for the track number.
//work out if the first line is a int for the track number.
while ((VFS_READ(f, &chr, 1)==1) && (chr != '\n'))
{
if (chr == '-')
@ -1733,6 +1736,7 @@ void CL_PlayDemo(char *demoname)
return;
}
VFS_SEEK(f, start);
}
#endif
//its not NQ then. must be QuakeWorld, either .qwd or .mvd
@ -1743,7 +1747,7 @@ void CL_PlayDemo(char *demoname)
!Q_strcasecmp(name + strlen(name) - 6, "mvd.gz"))
CL_PlayDemoStream(f, NULL, name, DPB_MVD, 0);
else
CL_PlayDemoStream(f, NULL, name, DPB_NETQUAKE, 0);
CL_PlayDemoStream(f, NULL, name, DPB_QUAKEWORLD, 0);
}
/*used with qtv*/