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.
Improving "ProQuake" Demo Record At Any Time
Re: Improving "ProQuake" Demo Record At Any Time
Adding this call to Host_Spawn will drop to console in local gamesmh wrote: I'd suggest the following instead:And:Code: Select all
CL_UpdateDemoStat (STAT_TOTALSECRETS); CL_UpdateDemoStat (STAT_TOTALMONSTERS); CL_UpdateDemoStat (STAT_SECRETS); CL_UpdateDemoStat (STAT_MONSTERS);
Code: Select all
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]); }
just using cl.stats[ in cl_demo instead of the pr_global_struct-> seems to work fine though.
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.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for