+ // LordHavoc: if the model has no flags, don't check each
+ if (ent->render.model && ent->render.model->flags)
+ {
+ if (ent->render.model->flags & EF_ROTATE)
+ {
+ ent->render.angles[1] = bobjrotate;
+ ent->render.origin[2] += bobjoffset;
+ }
+ // only do trails if present in the previous frame as well
+ if (ent->state_previous.active)
+ {
+ if (ent->render.model->flags & EF_GIB)
+ CL_RocketTrail (oldorg, neworg, 2, ent);
+ else if (ent->render.model->flags & EF_ZOMGIB)
+ CL_RocketTrail (oldorg, neworg, 4, ent);
+ else if (ent->render.model->flags & EF_TRACER)
+ CL_RocketTrail (oldorg, neworg, 3, ent);
+ else if (ent->render.model->flags & EF_TRACER2)
+ CL_RocketTrail (oldorg, neworg, 5, ent);
+ else if (ent->render.model->flags & EF_ROCKET)
+ {
+ CL_RocketTrail (oldorg, ent->render.origin, 0, ent);
+ // LordHavoc: changed from 200, 160, 80 to 250, 200, 100
+ dlightcolor[0] += 250.0f;
+ dlightcolor[1] += 200.0f;
+ dlightcolor[2] += 100.0f;
+ }
+ else if (ent->render.model->flags & EF_GRENADE)
+ {
+ if (ent->render.alpha == -1) // LordHavoc: Nehahra dem compatibility
+ CL_RocketTrail (oldorg, neworg, 7, ent);
+ else
+ CL_RocketTrail (oldorg, neworg, 1, ent);
+ }
+ else if (ent->render.model->flags & EF_TRACER3)
+ CL_RocketTrail (oldorg, neworg, 6, ent);
+ }
+ }
+ // LordHavoc: customizable glow
+ glowsize = ent->state_current.glowsize * 4.0f; // FIXME: interpolate?
+ glowcolor = ent->state_current.glowcolor;
+ if (glowsize)
+ {
+ qbyte *tempcolor = (qbyte *)&d_8to24table[glowcolor];
+ dlightcolor[0] += glowsize * tempcolor[0] * (1.0f / 255.0f);
+ dlightcolor[1] += glowsize * tempcolor[1] * (1.0f / 255.0f);
+ dlightcolor[2] += glowsize * tempcolor[2] * (1.0f / 255.0f);
+ }
+ // LordHavoc: customizable trail
+ if (ent->render.flags & RENDER_GLOWTRAIL)
+ CL_RocketTrail2 (oldorg, neworg, glowcolor, ent);