+ VectorCopy (neworg, ent->render.origin);
+ ent->render.flags = ent->state_current.flags;
+ ent->render.effects = effects = ent->state_current.effects;
+ if (cl.scores == NULL || !ent->state_current.colormap)
+ ent->render.colormap = -1; // no special coloring
+ else
+ ent->render.colormap = cl.scores[ent->state_current.colormap - 1].colors; // color it
+ ent->render.skinnum = ent->state_current.skin;
+ ent->render.alpha = ent->state_current.alpha * (1.0f / 255.0f); // FIXME: interpolate?
+ ent->render.scale = ent->state_current.scale * (1.0f / 16.0f); // FIXME: interpolate?
+
+ // update interpolation info
+ CL_LerpUpdate(ent);
+
+ // handle effects now...
+ dlightradius = 0;
+ dlightcolor[0] = 0;
+ dlightcolor[1] = 0;
+ dlightcolor[2] = 0;
+
+ // LordHavoc: if the entity has no effects, don't check each
+ if (effects)
+ {
+ if (effects & EF_BRIGHTFIELD)
+ CL_EntityParticles (ent);
+ if (effects & EF_MUZZLEFLASH)
+ ent->persistent.muzzleflash = 100.0f;
+ if (effects & EF_DIMLIGHT)
+ {
+ dlightcolor[0] += 200.0f;
+ dlightcolor[1] += 200.0f;
+ dlightcolor[2] += 200.0f;
+ }
+ if (effects & EF_BRIGHTLIGHT)
+ {
+ dlightcolor[0] += 400.0f;
+ dlightcolor[1] += 400.0f;
+ dlightcolor[2] += 400.0f;
+ }
+ // LordHavoc: added EF_RED and EF_BLUE
+ if (effects & EF_RED) // red
+ {
+ dlightcolor[0] += 200.0f;
+ dlightcolor[1] += 20.0f;
+ dlightcolor[2] += 20.0f;
+ }
+ if (effects & EF_BLUE) // blue
+ {
+ dlightcolor[0] += 20.0f;
+ dlightcolor[1] += 20.0f;
+ dlightcolor[2] += 200.0f;
+ }
+ if (effects & EF_FLAME)
+ {
+ if (ent->render.model)
+ {
+ mins[0] = neworg[0] - 16.0f;
+ mins[1] = neworg[1] - 16.0f;
+ mins[2] = neworg[2] - 16.0f;
+ maxs[0] = neworg[0] + 16.0f;
+ maxs[1] = neworg[1] + 16.0f;
+ maxs[2] = neworg[2] + 16.0f;
+ // how many flames to make
+ temp = (int) (cl.time * 300) - (int) (cl.oldtime * 300);
+ CL_FlameCube(mins, maxs, temp);
+ }
+ d = lhrandom(200, 250);
+ dlightcolor[0] += d * 1.0f;
+ dlightcolor[1] += d * 0.7f;
+ dlightcolor[2] += d * 0.3f;
+ }
+ if (effects & EF_STARDUST)
+ {
+ if (ent->render.model)
+ {
+ mins[0] = neworg[0] - 16.0f;
+ mins[1] = neworg[1] - 16.0f;
+ mins[2] = neworg[2] - 16.0f;
+ maxs[0] = neworg[0] + 16.0f;
+ maxs[1] = neworg[1] + 16.0f;
+ maxs[2] = neworg[2] + 16.0f;
+ // how many particles to make
+ temp = (int) (cl.time * 200) - (int) (cl.oldtime * 200);
+ CL_Stardust(mins, maxs, temp);
+ }
+ d = 100;
+ dlightcolor[0] += d * 1.0f;
+ dlightcolor[1] += d * 0.7f;
+ dlightcolor[2] += d * 0.3f;
+ }
+ }