Make the logic around the call to CL_ModelEffects more sensible.

This commit is contained in:
Bill Currie 2012-06-20 20:41:26 +09:00
parent 0dbdf6e1ac
commit c7a6293780
2 changed files with 5 additions and 6 deletions

View file

@ -381,7 +381,8 @@ CL_RelinkEntities (void)
if (VectorDistance_fast (state->msg_origins[1], ent->origin)
> (256 * 256))
VectorCopy (ent->origin, state->msg_origins[1]);
CL_ModelEffects (ent, i, state->glow_color);
if (model->flags & ~EF_ROTATE)
CL_ModelEffects (ent, i, state->glow_color);
state->forcelink = false;
}

View file

@ -201,6 +201,7 @@ CL_ModelEffects (entity_t *ent, int num, int glow_color)
dlight_t *dl;
model_t *model = ent->model;
// add automatic particle trails
if (model->flags & EF_ROCKET) {
dl = r_funcs->R_AllocDlight (num);
if (dl) {
@ -322,11 +323,8 @@ CL_LinkPacketEntities (void)
CL_TransformEntity (ent, s1->angles, false);
}
// add automatic particle trails
if (!model->flags)
continue;
CL_ModelEffects (ent, -s1->number, s1->glow_color);
if (model->flags & ~EF_ROTATE)
CL_ModelEffects (ent, -s1->number, s1->glow_color);
}
}