cl_parse.c: hack so demos playback at the correct speed even if they contain a lot of svc_stufftext messages (e.g. one every frame).

for a test case, play a demo from: http://www.quaketastic.com/upload/files/demos/otp_honey100.zip
for the honey map pack: http://www.quaketastic.com/upload/files/single_player/maps/honey.zip
on a slow pc that gets signifigantly less than 72fps, or with host_maxfps lowered (e.g. set to 33).

with QS 0.85.9, the demo will play in slow-motion; with QS 0.85.6 (without the cross-map demo support) it plays normally.

admittedly this is a fringe scenario, but it's imo a legitimate bug in the Pa3PyX cross-map demo playback code.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@974 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
ewasylishen 2014-08-24 18:37:28 +00:00
parent cb024b2ed5
commit b517b3d4fc
1 changed files with 12 additions and 3 deletions

View File

@ -999,9 +999,18 @@ void CL_ParseServerMessage (void)
break;
case svc_stufftext:
cls.stufftext_frame = host_framecount; // allow full frame update
// in demo playback -- Pa3PyX
Cbuf_AddText (MSG_ReadString ());
str = MSG_ReadString ();
// ericw -- hack - only wait for the full frame update if the stufftext
// contains "reconnect". some mods, e.g. honey, send stufftext every frame;
// if we were to set cls.stufftext_frame every frame, that would break
// the playback rate control (causing demos to play back in slow-motion
// if the client can't keep up)
if (strstr (str, "reconnect") != NULL)
{
cls.stufftext_frame = host_framecount; // allow full frame update
// in demo playback -- Pa3PyX
}
Cbuf_AddText (str);
break;
case svc_damage: