From 9c440ad9e259174a03485bf1481b84c70b2846b0 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 24 May 2012 21:13:33 +0900 Subject: [PATCH] Rename entity_state_t's skln to skinnum in nq. Also some whitespace and comment corrections. --- include/qw/protocol.h | 1 + nq/include/client.h | 5 ++--- nq/include/protocol.h | 7 ++++--- nq/source/cl_parse.c | 6 +++--- nq/source/sv_main.c | 6 +++--- qw/include/client.h | 7 +++---- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/qw/protocol.h b/include/qw/protocol.h index f698d51bb..4b9463da4 100644 --- a/include/qw/protocol.h +++ b/include/qw/protocol.h @@ -304,6 +304,7 @@ typedef struct { int number; // edict index unsigned int flags; // nolerp, etc + vec3_t origin; vec3_t angles; unsigned short modelindex; diff --git a/nq/include/client.h b/nq/include/client.h index 3590b0e12..f8ddb4a08 100644 --- a/nq/include/client.h +++ b/nq/include/client.h @@ -146,8 +146,7 @@ extern client_static_t cls; the client_state_t structure is wiped completely at every server signon */ -typedef struct -{ +typedef struct { qboolean loading; int movemessages; // Since connecting to this server throw out @@ -196,7 +195,7 @@ typedef struct double mtime[2]; // The timestamp of last two messages double time; // Clients view of time, should be between - // servertime and oldservertime to generate a + // servertime and oldvertime to generate a // lerp point for other data double oldtime; // Previous cl.time, time-oldtime is used // to decay light values and smooth step ups diff --git a/nq/include/protocol.h b/nq/include/protocol.h index 72d643279..f07310c98 100644 --- a/nq/include/protocol.h +++ b/nq/include/protocol.h @@ -223,15 +223,16 @@ #define MAX_CLIENTS 16 -typedef struct entity_state_s -{ +typedef struct entity_state_s { vec3_t origin; vec3_t angles; unsigned short modelindex; unsigned short frame; int effects; byte colormap; - byte skin; + byte skinnum; + + // QSG 2 byte alpha; byte scale; byte glow_size; diff --git a/nq/source/cl_parse.c b/nq/source/cl_parse.c index 4bfc1a2b5..8fc6ddf20 100644 --- a/nq/source/cl_parse.c +++ b/nq/source/cl_parse.c @@ -528,7 +528,7 @@ CL_ParseUpdate (int bits) if (bits & U_SKIN) skin = MSG_ReadByte (net_message); else - skin = state->baseline.skin; + skin = state->baseline.skinnum; if (skin != ent->skinnum) { ent->skinnum = skin; if (num <= cl.maxclients) { @@ -641,7 +641,7 @@ CL_ParseBaseline (cl_entity_state_t *state, int version) state->baseline.frame = MSG_ReadByte (net_message); state->baseline.colormap = MSG_ReadByte (net_message); - state->baseline.skin = MSG_ReadByte (net_message); + state->baseline.skinnum = MSG_ReadByte (net_message); MSG_ReadCoordAngleV (net_message, state->baseline.origin, state->baseline.angles); @@ -814,7 +814,7 @@ CL_ParseStatic (int version) ent->model = cl.model_precache[state.baseline.modelindex]; ent->frame = state.baseline.frame; ent->skin = 0; - ent->skinnum = state.baseline.skin; + ent->skinnum = state.baseline.skinnum; if (state.baseline.colormod == 255) { ent->colormod[0] = ent->colormod[1] = ent->colormod[2] = 1.0; } else { diff --git a/nq/source/sv_main.c b/nq/source/sv_main.c index e27ed31ff..d06ec4543 100644 --- a/nq/source/sv_main.c +++ b/nq/source/sv_main.c @@ -509,7 +509,7 @@ SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg) if (baseline->colormap != SVfloat (ent, colormap)) bits |= U_COLORMAP; - if (baseline->skin != SVfloat (ent, skin)) + if (baseline->skinnum != SVfloat (ent, skin)) bits |= U_SKIN; if (baseline->frame != SVfloat (ent, frame)) @@ -982,7 +982,7 @@ SV_CreateBaseline (void) VectorCopy (SVvector (svent, origin), baseline->origin); VectorCopy (SVvector (svent, angles), baseline->angles); baseline->frame = SVfloat (svent, frame); - baseline->skin = SVfloat (svent, skin); + baseline->skinnum = SVfloat (svent, skin); if (entnum > 0 && entnum <= svs.maxclients) { baseline->colormap = entnum; baseline->modelindex = SV_ModelIndex ("progs/player.mdl"); @@ -1034,7 +1034,7 @@ SV_CreateBaseline (void) else MSG_WriteByte (&sv.signon, baseline->frame); MSG_WriteByte (&sv.signon, baseline->colormap); - MSG_WriteByte (&sv.signon, baseline->skin); + MSG_WriteByte (&sv.signon, baseline->skinnum); MSG_WriteCoordAngleV (&sv.signon, baseline->origin, baseline->angles); diff --git a/qw/include/client.h b/qw/include/client.h index eb30e5f56..4b74b3fc0 100644 --- a/qw/include/client.h +++ b/qw/include/client.h @@ -201,8 +201,7 @@ extern client_static_t cls; /* the client_state_t structure is wiped completely at every server signon */ -typedef struct -{ +typedef struct { int servercount; // server identification for prespawns struct info_s *serverinfo; @@ -254,10 +253,10 @@ typedef struct qboolean paused; // send over by server - float punchangle; // temporar yview kick from weapon firing + float punchangle; // temporary view kick from weapon firing int intermission; // don't change view angle, full screen, etc - int completed_time; // latched ffrom time at intermission start + int completed_time; // latched from time at intermission start /* information that is static for the entire time connected to a server */