- // update light styles
- if (!skysurfaces && !depthonly && !prepass && model->brushq1.num_lightstyles && r_refdef.scene.lightmapintensity > 0)
- {
- model_brush_lightstyleinfo_t *style;
- // Iterate over each active style
- for (i = 0, style = model->brushq1.data_lightstyleinfo;i < model->brushq1.num_lightstyles;i++, style++)
- {
- if (style->value != r_refdef.scene.lightstylevalue[style->style])
- {
- int *list = style->surfacelist;
- style->value = r_refdef.scene.lightstylevalue[style->style];
- // Iterate over every surface this style applies to
- for (j = 0;j < style->numsurfaces;j++)
- // Update brush entities even if not visible otherwise they'll render solid black.
- if(r_refdef.viewcache.world_surfacevisible[list[j]])
- update[list[j]] = true;
- }
- }
- }