- revert the early-out "optimizations", since they were found to not

actually work.
This commit is contained in:
Adam Olsen 2001-12-05 08:03:50 +00:00
parent 2ac69ccae0
commit 6b10cb7c4b
2 changed files with 10 additions and 38 deletions

View file

@ -868,9 +868,6 @@ NET_SVC_Delta_Parse (entity_state_t *es, unsigned int bits, msg_t *msg)
if (bits & U_ANGLE3) if (bits & U_ANGLE3)
es->angles[2] = MSG_ReadAngle (msg); es->angles[2] = MSG_ReadAngle (msg);
if (!(bits & U_EXTEND1))
return; // early-out optimization
if (bits & U_ALPHA) if (bits & U_ALPHA)
es->alpha = MSG_ReadByte (msg); es->alpha = MSG_ReadByte (msg);
if (bits & U_SCALE) if (bits & U_SCALE)
@ -887,10 +884,6 @@ NET_SVC_Delta_Parse (entity_state_t *es, unsigned int bits, msg_t *msg)
es->glow_color = MSG_ReadByte (msg); es->glow_color = MSG_ReadByte (msg);
if (bits & U_COLORMOD) if (bits & U_COLORMOD)
es->colormod = MSG_ReadByte (msg); es->colormod = MSG_ReadByte (msg);
if (!(bits & U_EXTEND2))
return; // early-out optimization
if (bits & U_FRAME2) { if (bits & U_FRAME2) {
if (bits & U_FRAME) if (bits & U_FRAME)
es->frame = (es->frame & 0xFF) | (MSG_ReadByte (msg) << 8); es->frame = (es->frame & 0xFF) | (MSG_ReadByte (msg) << 8);
@ -900,8 +893,6 @@ NET_SVC_Delta_Parse (entity_state_t *es, unsigned int bits, msg_t *msg)
if (bits & U_SOLID) { if (bits & U_SOLID) {
// FIXME // FIXME
// U_GLOWTRAIL and U_VIEWMODEL as well.
// (and move above the early-out)
} }
} }

View file

@ -129,30 +129,10 @@ int bitcounts[32]; // / just for protocol profiling
void void
CL_EntityState_Copy (entity_state_t *src, entity_state_t *dest, int bits) CL_EntityState_Copy (entity_state_t *src, entity_state_t *dest, int bits)
{ {
// just incase they didn't set the group bits
if (bits & U_GROUP_EXTEND2)
bits |= U_EXTEND2;
if (bits & U_GROUP_EXTEND1)
bits |= U_EXTEND1;
if (bits & U_GROUP_MOREBITS)
bits |= U_MOREBITS;
if (bits & U_ORIGIN1)
dest->origin[0] = src->origin[0];
if (bits & U_ORIGIN2)
dest->origin[1] = src->origin[1];
if (bits & U_ORIGIN3)
dest->origin[2] = src->origin[2];
if (bits & U_ANGLE2)
dest->angles[1] = src->angles[1];
if (bits & U_FRAME)
dest->frame = (dest->frame & 0xFF00) | (src->frame & 0xFF);
if (!(bits & U_MOREBITS))
return; // early-out optimization
if (bits & U_MODEL) if (bits & U_MODEL)
dest->modelindex = src->modelindex; dest->modelindex = src->modelindex;
if (bits & U_FRAME)
dest->frame = (dest->frame & 0xFF00) | (src->frame & 0xFF);
if (bits & U_COLORMAP) if (bits & U_COLORMAP)
dest->colormap = src->colormap; dest->colormap = src->colormap;
if (bits & U_SKIN) if (bits & U_SKIN)
@ -160,14 +140,19 @@ CL_EntityState_Copy (entity_state_t *src, entity_state_t *dest, int bits)
if (bits & U_EFFECTS) if (bits & U_EFFECTS)
dest->effects = (dest->effects & 0xFF00) | (src->effects & 0xFF); dest->effects = (dest->effects & 0xFF00) | (src->effects & 0xFF);
if (bits & U_ORIGIN1)
dest->origin[0] = src->origin[0];
if (bits & U_ANGLE1) if (bits & U_ANGLE1)
dest->angles[0] = src->angles[0]; dest->angles[0] = src->angles[0];
if (bits & U_ORIGIN2)
dest->origin[1] = src->origin[1];
if (bits & U_ANGLE2)
dest->angles[1] = src->angles[1];
if (bits & U_ORIGIN3)
dest->origin[2] = src->origin[2];
if (bits & U_ANGLE3) if (bits & U_ANGLE3)
dest->angles[2] = src->angles[2]; dest->angles[2] = src->angles[2];
if (!(bits & U_EXTEND1))
return; // early-out optimization
if (bits & U_ALPHA) if (bits & U_ALPHA)
dest->alpha = src->alpha; dest->alpha = src->alpha;
if (bits & U_SCALE) if (bits & U_SCALE)
@ -180,10 +165,6 @@ CL_EntityState_Copy (entity_state_t *src, entity_state_t *dest, int bits)
dest->glow_color = src->glow_color; dest->glow_color = src->glow_color;
if (bits & U_COLORMOD) if (bits & U_COLORMOD)
dest->colormod = src->colormod; dest->colormod = src->colormod;
if (!(bits & U_EXTEND2))
return; // early-out optimization
if (bits & U_FRAME2) if (bits & U_FRAME2)
dest->frame = (dest->frame & 0xFF) | (src->frame & 0xFF00); dest->frame = (dest->frame & 0xFF) | (src->frame & 0xFF00);