X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=r_light.c;h=5cc2697948a874ac0fd021b97ea179db61d80b51;hp=9fd7478296e81ebde4c9f2101ca121af5d42b89f;hb=d3b158411b1d81181e05f750d9a7b0b2268438e2;hpb=f2fbe3c626ee6b68c329879b69701e434f368a96 diff --git a/r_light.c b/r_light.c index 9fd74782..5cc26979 100644 --- a/r_light.c +++ b/r_light.c @@ -275,7 +275,7 @@ void R_MarkLights(entity_render_t *ent) lightpvsbytes = 0; if (r_vismarklights.integer && ent->model->brush.FatPVS) lightpvsbytes = ent->model->brush.FatPVS(ent->model, lightorigin, 0, lightpvs, sizeof(lightpvs)); - R_RecursiveMarkLights(ent, lightorigin, rd, bit, bitindex, ent->model->brushq1.nodes + ent->model->brushq1.hulls[0].firstclipnode, lightpvs, min(lightpvsbytes * 8, ent->model->brushq1.num_leafs - 1)); + R_RecursiveMarkLights(ent, lightorigin, rd, bit, bitindex, ent->model->brushq1.nodes + ent->model->brushq1.hulls[0].firstclipnode, lightpvs, min(lightpvsbytes * 8, ent->model->brushq1.visleafs)); } } } @@ -301,16 +301,6 @@ void R_CompleteLightPoint(vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffu else VectorSet(ambientcolor, 1, 1, 1); - /* - if (leaf == NULL && cl.worldmodel != NULL) - leaf = cl.worldmodel->brushq1.PointInLeaf(cl.worldmodel, p); - if (!leaf || leaf->contents == CONTENTS_SOLID || !cl.worldmodel->brushq1.lightdata) - { - VectorSet(ambientcolor, 1, 1, 1); - return; - } - */ - // FIXME: this .lights related stuff needs to be ported into the Mod_Q1BSP code if (cl.worldmodel->brushq1.numlights) {