Revert "Tidy up CL_RelinkEntities a little bit."

This reverts commit ad7e7e45fe.

The cleanup broke entity linking, but fixing it would just duplicate the
previous tests, so might as well revert. Cleaning up the interpolation code
is probably a better approach.
This commit is contained in:
Bill Currie 2010-12-04 22:41:44 +09:00
parent cd660f6804
commit 9bce1630a6

View file

@ -492,7 +492,6 @@ CL_RelinkEntities (void)
dlight_t *dl;
float bobjrotate, frac, f, d;
int i, j;
int add_efrags;
vec3_t delta;
r_player_entity = &cl_entities[cl.viewentity];
@ -538,8 +537,6 @@ CL_RelinkEntities (void)
continue;
}
add_efrags = (i != cl.viewentity || chase_active->int_val);
VectorCopy (ent->origin, ent->old_origin);
if (state->forcelink) {
@ -547,6 +544,11 @@ CL_RelinkEntities (void)
// final spot
VectorCopy (state->msg_origins[0], ent->origin);
VectorCopy (state->msg_angles[0], ent->angles);
if (i != cl.viewentity || chase_active->int_val) {
if (ent->efrag)
R_RemoveEfrags (ent);
R_AddEfrags (ent);
}
} else {
// If the delta is large, assume a teleport and don't lerp
f = frac;
@ -573,13 +575,17 @@ CL_RelinkEntities (void)
ent->angles[j] = state->msg_angles[1][j] + f * d;
}
}
if (i != cl.viewentity || chase_active->int_val) {
if (ent->efrag) {
if (!VectorCompare (ent->origin, ent->old_origin)) {
R_RemoveEfrags (ent);
R_AddEfrags (ent);
}
} else {
R_AddEfrags (ent);
}
}
}
if (ent->efrag) {
if (!VectorCompare (ent->origin, ent->old_origin))
R_RemoveEfrags (ent);
}
if (add_efrags && !ent->efrag)
R_AddEfrags (ent);
// rotate binary objects locally
if (ent->model->flags & EF_ROTATE)