1
0
Fork 0
forked from fte/fteqw

fix bug with cl_maxfps 0 and demo playback causing lockup, fix netquake demo playback

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2259 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2006-05-09 08:35:10 +00:00
parent f38e614106
commit 11b188b761
3 changed files with 8 additions and 8 deletions

View file

@ -1258,9 +1258,10 @@ void CL_PlayDemo_f (void)
void CL_PlayDemo(char *demoname)
{
char name[256];
int ft, c, neg;
int ft, neg;
int len;
char type;
char chr;
int protocol;
int start;
@ -1346,16 +1347,16 @@ void CL_PlayDemo(char *demoname)
cls.protocol = CP_QUAKEWORLD;
ft = 0; //work out if the first line is a int for the track number.
while ((VFS_READ(cls.demofile, &c, 1)==1) && (c != '\n'))
while ((VFS_READ(cls.demofile, &chr, 1)==1) && (chr != '\n'))
{
if (c == '-')
if (chr == '-')
neg = true;
else if (c < '0' || c > '9')
else if (chr < '0' || chr > '9')
break;
else
ft = ft * 10 + (c - '0');
ft = ft * 10 + ((int)chr - '0');
}
if (c == '\n')
if (chr == '\n')
{
#ifndef NQPROT
Con_Printf ("ERROR: cannot play NQ demos.\n");

View file

@ -2993,7 +2993,7 @@ void Host_Frame (double time)
*/
Mod_Think(); //think even on idle (which means small walls and a fast cpu can get more surfaces done.
if ((cl_maxfps.value>0 && cl_netfps.value>0) || cls.demoplayback)
if (cl_maxfps.value>0 && (cl_netfps.value>0 || cls.demoplayback))
{ //limit the fps freely, and expect the netfps to cope.
if ((realtime - oldrealtime) < 1/cl_maxfps.value)
return;

View file

@ -226,7 +226,6 @@ struct soundcardinfo_s { //windows has one defined AFTER directsound
int paintedtime; //used in the mixer
int oldsamplepos; //fixme: is this still needed?
int snd_linear_count; //used by the mixer.
int buffers; //used to keep track of buffer wraps for consistant sound
//callbacks