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

View file

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