Matrix4x4_CreateIdentity(&ent->render.matrix);
Matrix4x4_CreateIdentity(&ent->render.inversematrix);
CL_BoundingBoxForEntity(&ent->render);
+ ent->render.flags = RENDER_SHADOW;
+ if (!r_fullbright.integer)
+ ent->render.flags |= RENDER_LIGHT;
}
static void CL_RelinkStaticEntities(void)
GL_DepthTest(true);
GL_BlendFunc(GL_ONE, GL_ZERO);
m.tex[0] = R_GetTexture(texture->skin.base);
- GL_Color(r_lightmapintensity, r_lightmapintensity, r_lightmapintensity, 1);
+ if (ent->flags & RENDER_LIGHT)
+ GL_Color(r_lightmapintensity, r_lightmapintensity, r_lightmapintensity, 1);
+ else
+ GL_Color(1, 1, 1, 1);
while((surf = *surfchain++) != NULL)
{
if (surf->visframe == r_framecount)
R_Shadow_Stage_Light(shadow && gl_stencil);
ent = &cl_entities[0].render;
- if (ent->model && ent->model->DrawLight)
+ if (ent->model && ent->model->DrawLight && (ent->flags & RENDER_LIGHT))
{
Matrix4x4_Transform(&ent->inversematrix, rtlight->shadoworigin, relativelightorigin);
Matrix4x4_Transform(&ent->inversematrix, r_vieworigin, relativeeyeorigin);