mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-03 06:20:57 +00:00
Moved the stufftext_frame global to client_static_t structure and
adjusted CL_GetDemoMessage and CL_ParseServerMessage accordingly. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@644 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
d15b6575b3
commit
e324a7ffc5
3 changed files with 14 additions and 17 deletions
|
@ -20,8 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#include "quakedef.h"
|
#include "quakedef.h"
|
||||||
|
|
||||||
int stufftext_frame;
|
|
||||||
|
|
||||||
static void CL_FinishTimeDemo (void);
|
static void CL_FinishTimeDemo (void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -90,11 +88,11 @@ static int CL_GetDemoMessage (void)
|
||||||
// decide if it is time to grab the next message
|
// decide if it is time to grab the next message
|
||||||
if (cls.signon == SIGNONS) // always grab until fully connected
|
if (cls.signon == SIGNONS) // always grab until fully connected
|
||||||
{
|
{
|
||||||
// Always wait for full frame update on stuff messages.
|
// Wait for full frame update on stufftext messages:
|
||||||
// If the server stuffs a reconnect, we must wait for
|
// If the server stuffs a "reconnect", failing to wait
|
||||||
// the client to re-initialize before accepting further
|
// for the client to re-initialize before accepting
|
||||||
// messages. Otherwise demo playback may freeze. Pa3PyX
|
// further messages freezes demo playback. -- Pa3PyX
|
||||||
if (stufftext_frame == host_framecount)
|
if (host_framecount == cls.stufftext_frame)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (cls.timedemo)
|
if (cls.timedemo)
|
||||||
|
|
|
@ -91,7 +91,6 @@ const char *svc_strings[] =
|
||||||
qboolean warn_about_nehahra_protocol; //johnfitz
|
qboolean warn_about_nehahra_protocol; //johnfitz
|
||||||
|
|
||||||
extern vec3_t v_punchangles[2]; //johnfitz
|
extern vec3_t v_punchangles[2]; //johnfitz
|
||||||
extern int stufftext_frame;
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
|
@ -1004,8 +1003,8 @@ void CL_ParseServerMessage (void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case svc_stufftext:
|
case svc_stufftext:
|
||||||
stufftext_frame = host_framecount; // allow full frame update
|
cls.stufftext_frame = host_framecount; // allow full frame update
|
||||||
// on stuff messages. Pa3PyX
|
// in demo playback -- Pa3PyX
|
||||||
Cbuf_AddText (MSG_ReadString ());
|
Cbuf_AddText (MSG_ReadString ());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -108,23 +108,23 @@ typedef struct
|
||||||
char spawnparms[MAX_MAPSTRING]; // to restart a level
|
char spawnparms[MAX_MAPSTRING]; // to restart a level
|
||||||
|
|
||||||
// demo loop control
|
// demo loop control
|
||||||
int demonum; // -1 = don't play demos
|
int demonum; // -1 = don't play demos
|
||||||
char demos[MAX_DEMOS][MAX_DEMONAME]; // when not playing
|
char demos[MAX_DEMOS][MAX_DEMONAME]; // when not playing
|
||||||
|
|
||||||
// demo recording info must be here, because record is started before
|
// demo recording info must be here, because record is started before
|
||||||
// entering a map (and clearing client_state_t)
|
// entering a map (and clearing client_state_t)
|
||||||
qboolean demorecording;
|
qboolean demorecording;
|
||||||
qboolean demoplayback;
|
qboolean demoplayback;
|
||||||
qboolean timedemo;
|
qboolean timedemo;
|
||||||
int forcetrack; // -1 = use normal cd track
|
int forcetrack; // -1 = use normal cd track
|
||||||
FILE *demofile;
|
FILE *demofile;
|
||||||
int td_lastframe; // to meter out one message a frame
|
int td_lastframe; // to meter out one message a frame
|
||||||
int td_startframe; // host_framecount at start
|
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
|
float td_starttime; // realtime at second frame of timedemo
|
||||||
|
|
||||||
|
|
||||||
// connection information
|
// connection information
|
||||||
int signon; // 0 to SIGNONS
|
int signon; // 0 to SIGNONS
|
||||||
struct qsocket_s *netcon;
|
struct qsocket_s *netcon;
|
||||||
sizebuf_t message; // writing buffer to send to server
|
sizebuf_t message; // writing buffer to send to server
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue