dlightsetup:
//Con_Printf("dlight %i : %f %f %f : %f %f %f\n", i, org[0], org[1], org[2], red * radius, green * radius, blue * radius);
memset (dl, 0, sizeof(*dl));
- //dl->ent = ent;
+ dl->ent = ent;
VectorCopy(org, dl->origin);
dl->radius = radius;
dl->color[0] = red;
{
// * 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);
+ VectorMA(dlightcolor, ent->state_current.glowsize * (4.0f / 255.0f), (qbyte *)&palette_complete[ent->state_current.glowcolor], dlightcolor);
}
// LordHavoc: customizable trail
if (ent->render.flags & RENDER_GLOWTRAIL)
{
VectorCopy(neworg, v);
// hack to make glowing player light shine on their gun
- if (i == cl.viewentity && !chase_active.integer)
+ if (i == cl.viewentity/* && !chase_active.integer*/)
v[2] += 30;
- CL_AllocDlight (NULL, v, 1, dlightcolor[0], dlightcolor[1], dlightcolor[2], 0, 0);
+ CL_AllocDlight (&ent->render, v, 1, dlightcolor[0], dlightcolor[1], dlightcolor[2], 0, 0);
}
if (chase_active.integer)