diff --git a/Quake/cl_demo.c b/Quake/cl_demo.c index 103d2506..0ff8df79 100644 --- a/Quake/cl_demo.c +++ b/Quake/cl_demo.c @@ -20,6 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" +int stufftext_frame; + static void CL_FinishTimeDemo (void); /* @@ -88,6 +90,13 @@ static int CL_GetDemoMessage (void) // decide if it is time to grab the next message if (cls.signon == SIGNONS) // always grab until fully connected { + // Always wait for full frame update on stuff messages. + // If the server stuffs a reconnect, we must wait for + // the client to re-initialize before accepting further + // messages. Otherwise demo playback may freeze. Pa3PyX + if (stufftext_frame == host_framecount) + return 0; + if (cls.timedemo) { if (host_framecount == cls.td_lastframe) @@ -329,6 +338,10 @@ void CL_PlayDemo_f (void) } if (neg) cls.forcetrack = -cls.forcetrack; + +// Get a new message on playback start. +// Moved from CL_TimeDemo_f to here, Pa3PyX. + cls.td_lastframe = -1; } /* @@ -377,6 +390,7 @@ void CL_TimeDemo_f (void) cls.timedemo = true; cls.td_startframe = host_framecount; - cls.td_lastframe = -1; // get a new message this frame +// cls.td_lastframe = -1; // get a new message this frame + // Moved to CL_PlayDemo_f(), Pa3PyX. } diff --git a/Quake/cl_parse.c b/Quake/cl_parse.c index 037a9b3c..dd251256 100644 --- a/Quake/cl_parse.c +++ b/Quake/cl_parse.c @@ -91,6 +91,7 @@ const char *svc_strings[] = qboolean warn_about_nehahra_protocol; //johnfitz extern vec3_t v_punchangles[2]; //johnfitz +extern int stufftext_frame; //============================================================================= @@ -1003,6 +1004,8 @@ void CL_ParseServerMessage (void) break; case svc_stufftext: + stufftext_frame = host_framecount; // allow full frame update + // on stuff messages. Pa3PyX Cbuf_AddText (MSG_ReadString ()); break;