+ // 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);
+ dlightcolor[0] += 0x10;
+ dlightcolor[1] += 0x40;
+ dlightcolor[2] += 0x10;
+ }
+ else if (ent->render.model->flags & EF_TRACER2)
+ {
+ CL_RocketTrail (oldorg, neworg, 5, ent);
+ dlightcolor[0] += 0x50;
+ dlightcolor[1] += 0x30;
+ dlightcolor[2] += 0x10;
+ }
+ else if (ent->render.model->flags & EF_ROCKET)
+ {
+ CL_RocketTrail (oldorg, ent->render.origin, 0, ent);
+ dlightcolor[0] += 200.0f;
+ dlightcolor[1] += 160.0f;
+ dlightcolor[2] += 80.0f;
+ }
+ else if (ent->render.model->flags & EF_GRENADE)
+ {
+ if (ent->render.alpha == -1) // LordHavoc: Nehahra dem compatibility (cigar smoke)
+ 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);
+ dlightcolor[0] += 0x50;
+ dlightcolor[1] += 0x20;
+ dlightcolor[2] += 0x40;
+ }
+ }
+ }
+ // LordHavoc: customizable glow
+ if (ent->state_current.glowsize)
+ {
+ // * 4 for the expansion from 0-255 to 0-1023 range,
+ // / 255 to scale down byte colors
+ VectorMA(dlightcolor, ent->state_current.glowsize * (4.0f / 255.0f), (qbyte *)&d_8to24table[ent->state_current.glowcolor], dlightcolor);
+ }
+ // LordHavoc: customizable trail
+ if (ent->render.flags & RENDER_GLOWTRAIL)
+ CL_RocketTrail2 (oldorg, neworg, ent->state_current.glowcolor, ent);