mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
Fix #165 by not ignoring the track specified in the NQ demo header
This commit is contained in:
parent
a05c722cbd
commit
6692afa55b
4 changed files with 12 additions and 0 deletions
|
@ -77,6 +77,7 @@ void CL_StopPlayback (void)
|
|||
cls.state = ca_disconnected;
|
||||
cls.demoplayback = DPB_NONE;
|
||||
cls.demoseeking = false; //just in case
|
||||
cls.demotrack = -1;
|
||||
|
||||
if (cls.timedemo)
|
||||
CL_FinishTimeDemo ();
|
||||
|
@ -2415,6 +2416,11 @@ void CL_PlayDemoFile(vfsfile_t *f, char *demoname, qboolean issyspath)
|
|||
ft *= -1;
|
||||
if (chr == '\n')
|
||||
{
|
||||
if (ft > 0)
|
||||
cls.demotrack = ft;
|
||||
else
|
||||
cls.demotrack = -1;
|
||||
|
||||
CL_PlayDemoStream(f, demoname, issyspath, DPB_NETQUAKE, 0);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -5135,6 +5135,7 @@ void CL_Init (void)
|
|||
size_t seat;
|
||||
|
||||
cls.state = ca_disconnected;
|
||||
cls.demotrack = -1;
|
||||
|
||||
#ifdef SVNREVISION
|
||||
if (strcmp(STRINGIFY(SVNREVISION), "-"))
|
||||
|
|
|
@ -8405,6 +8405,10 @@ void CLNQ_ParseServerMessage (void)
|
|||
unsigned int looptrack;
|
||||
firsttrack = MSG_ReadByte ();
|
||||
looptrack = MSG_ReadByte ();
|
||||
|
||||
if (cls.demotrack != -1)
|
||||
firsttrack = looptrack = cls.demotrack;
|
||||
|
||||
Media_NumberedTrack (firsttrack, looptrack);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -518,6 +518,7 @@ typedef struct
|
|||
qboolean demohadkeyframe; //q2 needs to wait for a packet with a key frame, supposedly.
|
||||
qboolean demoseeking;
|
||||
float demoseektime;
|
||||
int demotrack;
|
||||
qboolean timedemo;
|
||||
char lastdemoname[MAX_OSPATH];
|
||||
qboolean lastdemowassystempath;
|
||||
|
|
Loading…
Reference in a new issue