diff --git a/Quake/cl_demo.c b/Quake/cl_demo.c index 0ff8df79..cf28de20 100644 --- a/Quake/cl_demo.c +++ b/Quake/cl_demo.c @@ -20,8 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" -int stufftext_frame; - static void CL_FinishTimeDemo (void); /* @@ -90,11 +88,11 @@ 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) + // Wait for full frame update on stufftext messages: + // If the server stuffs a "reconnect", failing to wait + // for the client to re-initialize before accepting + // further messages freezes demo playback. -- Pa3PyX + if (host_framecount == cls.stufftext_frame) return 0; if (cls.timedemo) diff --git a/Quake/cl_parse.c b/Quake/cl_parse.c index dd251256..ffac9ae2 100644 --- a/Quake/cl_parse.c +++ b/Quake/cl_parse.c @@ -91,7 +91,6 @@ const char *svc_strings[] = qboolean warn_about_nehahra_protocol; //johnfitz extern vec3_t v_punchangles[2]; //johnfitz -extern int stufftext_frame; //============================================================================= @@ -1004,8 +1003,8 @@ void CL_ParseServerMessage (void) break; case svc_stufftext: - stufftext_frame = host_framecount; // allow full frame update - // on stuff messages. Pa3PyX + cls.stufftext_frame = host_framecount; // allow full frame update + // in demo playback -- Pa3PyX Cbuf_AddText (MSG_ReadString ()); break; diff --git a/Quake/client.h b/Quake/client.h index f1f903fc..eed9f062 100644 --- a/Quake/client.h +++ b/Quake/client.h @@ -108,23 +108,23 @@ typedef struct char spawnparms[MAX_MAPSTRING]; // to restart a level // demo loop control - int demonum; // -1 = don't play demos - char demos[MAX_DEMOS][MAX_DEMONAME]; // when not playing + int demonum; // -1 = don't play demos + char demos[MAX_DEMOS][MAX_DEMONAME]; // when not playing // demo recording info must be here, because record is started before // entering a map (and clearing client_state_t) qboolean demorecording; qboolean demoplayback; qboolean timedemo; - int forcetrack; // -1 = use normal cd track + int forcetrack; // -1 = use normal cd track FILE *demofile; - int td_lastframe; // to meter out one message a frame - int td_startframe; // host_framecount at start + int td_lastframe; // to meter out one message a frame + int td_startframe; // host_framecount at start + int stufftext_frame; // host_framecount when svc_stufftext is received float td_starttime; // realtime at second frame of timedemo - // connection information - int signon; // 0 to SIGNONS + int signon; // 0 to SIGNONS struct qsocket_s *netcon; sizebuf_t message; // writing buffer to send to server