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:
parent
75ef62b6f3
commit
a1a78d787f
1 changed files with 35 additions and 31 deletions
|
@ -1646,11 +1646,6 @@ void CL_PlayDemoStream(vfsfile_t *file, struct dl_download *dl, char *filename,
|
||||||
void CL_PlayDemo(char *demoname)
|
void CL_PlayDemo(char *demoname)
|
||||||
{
|
{
|
||||||
char name[256];
|
char name[256];
|
||||||
int ft, neg = false;
|
|
||||||
int len;
|
|
||||||
char type;
|
|
||||||
char chr;
|
|
||||||
int protocol;
|
|
||||||
int start;
|
int start;
|
||||||
vfsfile_t *f;
|
vfsfile_t *f;
|
||||||
|
|
||||||
|
@ -1701,6 +1696,10 @@ void CL_PlayDemo(char *demoname)
|
||||||
start = VFS_TELL(f);
|
start = VFS_TELL(f);
|
||||||
|
|
||||||
#ifdef Q2CLIENT
|
#ifdef Q2CLIENT
|
||||||
|
{
|
||||||
|
int len;
|
||||||
|
char type;
|
||||||
|
int protocol;
|
||||||
//check if its a quake2 demo.
|
//check if its a quake2 demo.
|
||||||
VFS_READ(f, &len, sizeof(len));
|
VFS_READ(f, &len, sizeof(len));
|
||||||
VFS_READ(f, &type, sizeof(type));
|
VFS_READ(f, &type, sizeof(type));
|
||||||
|
@ -1711,11 +1710,15 @@ void CL_PlayDemo(char *demoname)
|
||||||
CL_PlayDemoStream(f, NULL, name, DPB_QUAKE2, 0);
|
CL_PlayDemoStream(f, NULL, name, DPB_QUAKE2, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NQPROT
|
#ifdef NQPROT
|
||||||
|
{
|
||||||
|
int ft = 0, neg = false;
|
||||||
|
char chr;
|
||||||
//not quake2, check if its NQ
|
//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'))
|
while ((VFS_READ(f, &chr, 1)==1) && (chr != '\n'))
|
||||||
{
|
{
|
||||||
if (chr == '-')
|
if (chr == '-')
|
||||||
|
@ -1733,6 +1736,7 @@ void CL_PlayDemo(char *demoname)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
VFS_SEEK(f, start);
|
VFS_SEEK(f, start);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//its not NQ then. must be QuakeWorld, either .qwd or .mvd
|
//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"))
|
!Q_strcasecmp(name + strlen(name) - 6, "mvd.gz"))
|
||||||
CL_PlayDemoStream(f, NULL, name, DPB_MVD, 0);
|
CL_PlayDemoStream(f, NULL, name, DPB_MVD, 0);
|
||||||
else
|
else
|
||||||
CL_PlayDemoStream(f, NULL, name, DPB_NETQUAKE, 0);
|
CL_PlayDemoStream(f, NULL, name, DPB_QUAKEWORLD, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*used with qtv*/
|
/*used with qtv*/
|
||||||
|
|
Loading…
Reference in a new issue