return;
if (cgvm_renderentity >= CGVM_RENDERENTITIES
- || r_refdef.numentities >= MAX_VISEDICTS)
+ || r_refdef.numentities >= r_refdef.maxentities)
return;
r = cgvm_renderentities + cgvm_renderentity;
void CGVM_Draw_Light(const cgdrawlight_t *l)
{
- CL_AllocDlight(NULL, (float *) l->origin, 1, l->light[0], l->light[1], l->light[2], 0, 0);
+ matrix4x4_t matrix;
+ Matrix4x4_CreateTranslate(&matrix, l->origin[0], l->origin[1], l->origin[2]);
+ CL_AllocDlight(NULL, &matrix, l->radius, l->color[0], l->color[1], l->color[2], 0, 0, 0, 0, true, 1);
}
void *CGVM_Malloc(const int size)
middle[2] = (worldmins[2] + worldmaxs[2]) * 0.5f;
VectorAdd(start, middle, start2);
VectorAdd(end, middle, end2);
- frac = CL_TraceLine((float *)start2, (float *)end2, impactpos, impactnormal, 0, true);
+ frac = CL_TraceLine((float *)start2, (float *)end2, impactpos, impactnormal, true, NULL, SUPERCONTENTS_SOLID);
VectorSubtract(impactpos, middle, impactpos);
*impactentnum = -1;
return frac;
void CGVM_Stain(const float *origin, float radius, int cr1, int cg1, int cb1, int ca1, int cr2, int cg2, int cb2, int ca2)
{
- R_Stain((float *)origin, radius, cr1, cg1, cb1, ca1, cr2, cg2, cb2, ca2);
+ if (cl_stainmaps.integer)
+ R_Stain((float *)origin, radius, cr1, cg1, cb1, ca1, cr2, cg2, cb2, ca2);
}