{
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, 0.25, 0, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
+ CL_AllocDlight(NULL, &matrix, l->radius, l->color[0], l->color[1], l->color[2], 0, 0, 0, -1, true, 1, 0.25, 0, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
}
void *CGVM_Malloc(const int size)
tempmatrix.m[0][3] = v[0];
tempmatrix.m[1][3] = v[1];
tempmatrix.m[2][3] = v[2];
- CL_AllocDlight(NULL, &tempmatrix, 100, e->persistent.muzzleflash, e->persistent.muzzleflash, e->persistent.muzzleflash, 0, 0, 0, 0, true, 0, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
+ CL_AllocDlight(NULL, &tempmatrix, 100, e->persistent.muzzleflash, e->persistent.muzzleflash, e->persistent.muzzleflash, 0, 0, 0, -1, true, 0, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
e->persistent.muzzleflash -= cl.frametime * 10;
}
// LordHavoc: if the model has no flags, don't check each
// hack to make glowing player light shine on their gun
//if ((e - cl_entities) == cl.viewentity/* && !chase_active.integer*/)
// dlightmatrix.m[2][3] += 30;
- CL_AllocDlight(&e->render, &e->render.matrix, dlightradius, dlightcolor[0], dlightcolor[1], dlightcolor[2], 0, 0, 0, 0, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
+ CL_AllocDlight(&e->render, &e->render.matrix, dlightradius, dlightcolor[0], dlightcolor[1], dlightcolor[2], 0, 0, 0, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
}
// custom rtlight
if (e->state_current.lightpflags & PFLAGS_FULLDYNAMIC)
{
// FIXME: create a matrix from the beam start/end orientation
Matrix4x4_CreateTranslate(&tempmatrix, b->end[0], b->end[1], b->end[2]);
- CL_AllocDlight (NULL, &tempmatrix, 200, 0.3, 0.7, 1, 0, 0, 0, 0, true, 1, 0.25, 1, 0, 0, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
+ CL_AllocDlight (NULL, &tempmatrix, 200, 0.3, 0.7, 1, 0, 0, 0, -1, true, 1, 0.25, 1, 0, 0, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
}
if (cl_beams_polygons.integer)
continue;
rtlight->lightmap_cullradius = bound(0, rtlight->radius, 2048.0f);
rtlight->lightmap_cullradius2 = rtlight->lightmap_cullradius * rtlight->lightmap_cullradius;
- VectorScale(rtlight->color, rtlight->radius * d_lightstylevalue[rtlight->style] * 0.125f, rtlight->lightmap_light);
+ VectorScale(rtlight->color, rtlight->radius * (rtlight->style >= 0 ? d_lightstylevalue[rtlight->style] : 128) * 0.125f, rtlight->lightmap_light);
rtlight->lightmap_subtract = 1.0f / rtlight->lightmap_cullradius2;
}
cullmaxs[0] = rtlight->shadoworigin[0] + rtlight->radius;
cullmaxs[1] = rtlight->shadoworigin[1] + rtlight->radius;
cullmaxs[2] = rtlight->shadoworigin[2] + rtlight->radius;
- if (d_lightstylevalue[rtlight->style] <= 0)
+ if (rtlight->style >= 0 && d_lightstylevalue[rtlight->style] <= 0)
return;
numclusters = 0;
clusterlist = NULL;
if (R_Shadow_ScissorForBBox(cullmins, cullmaxs))
return;
- f = d_lightstylevalue[rtlight->style] * (1.0f / 256.0f);
+ f = (rtlight->style >= 0 ? d_lightstylevalue[rtlight->style] : 128) * (1.0f / 256.0f);
VectorScale(rtlight->color, f, lightcolor);
/*
if (rtlight->selected)