From a49c123d844c2617c595e88b6523882a20303d4a Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 31 May 2012 08:14:05 +0900 Subject: [PATCH] Shuffle some fields around in cient_state_t. --- nq/include/client.h | 7 ++----- qw/include/client.h | 41 ++++++++++++++++++----------------------- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/nq/include/client.h b/nq/include/client.h index a25a77279..9dbb20bbf 100644 --- a/nq/include/client.h +++ b/nq/include/client.h @@ -170,11 +170,9 @@ typedef struct { vec3_t mviewangles[2]; // During demo playback viewangles is lerped // between these vec3_t viewangles; - vec3_t mvelocity[2]; // Update by server, used for lean+bob // (0 is newest) vec3_t velocity; // Lerped between mvelocity[0] and [1] - vec3_t punchangle; // Temporary offset // pitch drifting vars @@ -187,7 +185,7 @@ typedef struct { float viewheight; float crouch; // Local amount for smoothing stepups - qboolean paused; // Send over by server + qboolean paused; // Sent over by server qboolean onground; qboolean inwater; @@ -215,6 +213,7 @@ typedef struct { char levelname[40]; // for display on solo scoreboard int viewentity; // cl_entitites[cl.viewentity] = player + unsigned protocol; int maxclients; int gametype; @@ -228,8 +227,6 @@ typedef struct { // frag scoreboard scoreboard_t *scores; // [cl.maxclients] - unsigned protocol; - int sv_cshifts; int chase; int fpd; diff --git a/qw/include/client.h b/qw/include/client.h index 5c0609c16..c5ede3b0d 100644 --- a/qw/include/client.h +++ b/qw/include/client.h @@ -199,25 +199,10 @@ extern client_static_t cls; the client_state_t structure is wiped completely at every server signon */ typedef struct { - int servercount; // server identification for prespawns - - struct info_s *serverinfo; - - int parsecount; // server message counter - int validsequence; // this is the sequence number of the last good - // packetentity_t we got. If this is 0, we can't - // render a frame yet - int movemessages; // since connecting to this server - // throw out the first couple, so the player - // doesn't accidentally do something the - // first frame - - int spectator; - - double last_ping_request; // while showing scoreboard - double last_servermessage; - -// sentcmds[cl.netchan.outgoing_sequence & UPDATE_MASK] = cmd + int movemessages; // Since connecting to this server throw out + // the first couple, so the player doesn't + // accidentally do something the first frame + // sentcmds[cl.netchan.outgoing_sequence & UPDATE_MASK] = cmd frame_t frames[UPDATE_BACKUP]; // information for local display @@ -239,6 +224,8 @@ typedef struct { vec3_t simvel; vec3_t simangles; + float punchangle; // temporary view kick from weapon firing + // pitch drifting vars float idealpitch; float pitchvel; @@ -246,13 +233,22 @@ typedef struct { float driftmove; double laststop; + qboolean paused; // Sent over by server int onground; // -1 when in air float viewheight; float crouch; // local amount for smoothing stepups - qboolean paused; // send over by server + int servercount; // server identification for prespawns + struct info_s *serverinfo; + int parsecount; // server message counter + int validsequence; // this is the sequence number of the last good + // packetentity_t we got. If this is 0, we + // can't render a frame yet - float punchangle; // temporary view kick from weapon firing + int spectator; + + double last_ping_request; // while showing scoreboard + double last_servermessage; int intermission; // don't change view angle, full screen, etc int completed_time; // latched from time at intermission start @@ -287,11 +283,10 @@ typedef struct { // refresh related state struct model_s *worldmodel; // cl_entitites[0].model int num_entities; // stored bottom up in cl_entities array + entity_t viewent; // weapon model int cdtrack; // cd audio - entity_t viewent; // weapon model - // all player information player_info_t players[MAX_CLIENTS];