FAQ  •  Register  •  Login

Improving "ProQuake" Demo Record At Any Time

Moderator: Inside3D Admins

<<

qbism

User avatar

Posts: 789

Joined: Thu Nov 04, 2004 5:51 am

Post Tue Jul 17, 2012 5:22 pm

Re: Improving "ProQuake" Demo Record At Any Time

That is much more elegant...
Record could take an additional argument, milliseconds, which is how far back in time to "rewind" the buffer. (Or a new record command with this behaviour.) "-1" or something could mean back to the max size of the buffer, which could be from the beginning if memory is large enough as Spike mentioned.
<<

r00k

Posts: 906

Joined: Sat Nov 13, 2004 10:39 pm

Post Tue Jul 17, 2012 9:12 pm

Re: Improving "ProQuake" Demo Record At Any Time

mh wrote:I'd suggest the following instead:
  Code:
      CL_UpdateDemoStat (STAT_TOTALSECRETS);
      CL_UpdateDemoStat (STAT_TOTALMONSTERS);
      CL_UpdateDemoStat (STAT_SECRETS);
      CL_UpdateDemoStat (STAT_MONSTERS);

And:
  Code:
void CL_UpdateDemoStat (int stat)
{
   if (stat < 0 || stat >= MAX_CL_STATS) return;

   MSG_WriteByte (&net_message, svc_updatestat);
   MSG_WriteByte (&net_message, stat);
   MSG_WriteLong (&net_message, cl.stats[stat]);
}



Adding this call to Host_Spawn will drop to console in local games :(
just using cl.stats[ in cl_demo instead of the pr_global_struct-> seems to work fine though.
<<

mh

User avatar

Posts: 2172

Joined: Sat Jan 12, 2008 1:38 am

Post Tue Jul 17, 2012 9:30 pm

Re: Improving "ProQuake" Demo Record At Any Time

I don't mean add it to Host_Spawn, I mean use it in CL_Record_f instead of the code that Baker originally posted. Host_Spawn is fine as it is.
Like the fifth day of playing 24-hour Scrabble when you don't want to use any letters because each one means a world to you because you're so deranged.
Previous

Return to Programming Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.
Icons provided by Aha Soft