Demoes are working again (for uncopressed .dem files, anyway)

This commit is contained in:
Bill Currie 2000-02-03 01:49:11 +00:00
parent b526d14bb9
commit 64a5b117ab
2 changed files with 3 additions and 3 deletions

View File

@ -204,7 +204,7 @@ qboolean CL_GetDemoMessage (void)
i = cls.netchan.outgoing_sequence & UPDATE_MASK;
pcmd = &cl.frames[i].cmd;
r = gzread (cls.demofile, pcmd, sizeof(*pcmd));
if (r != 1)
if (r != sizeof(*pcmd))
{
CL_StopPlayback ();
return 0;
@ -233,7 +233,7 @@ qboolean CL_GetDemoMessage (void)
if (net_message.cursize > MAX_MSGLEN)
Sys_Error ("Demo message > MAX_MSGLEN");
r = gzread (cls.demofile, net_message.data, net_message.cursize);
if (r != 1)
if (r != net_message.cursize)
{
CL_StopPlayback ();
return 0;

View File

@ -134,7 +134,7 @@ int CL_GetMessage (void)
if (net_message.cursize > MAX_MSGLEN)
Sys_Error ("Demo message > MAX_MSGLEN");
r = gzread (cls.demofile, net_message.data, net_message.cursize);
if (r != 1)
if (r != net_message.cursize)
{
CL_StopPlayback ();
return 0;