LightFace_Min: allow delay 4 lights to use lightstyles
This commit is contained in:
parent
651e7ca827
commit
9496991e60
|
|
@ -1047,12 +1047,18 @@ LightFace_Min(const lightsample_t *light,
|
||||||
hit = true;
|
hit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hit)
|
||||||
|
Lightmap_Save(lightmaps, lightsurf, lightmap, 0);
|
||||||
|
|
||||||
/* Cast rays for local minlight entities */
|
/* Cast rays for local minlight entities */
|
||||||
shadowself = modelinfo->shadowself ? modelinfo->model : NULL;
|
shadowself = modelinfo->shadowself ? modelinfo->model : NULL;
|
||||||
for (entity = lights; *entity; entity++) {
|
for (entity = lights; *entity; entity++) {
|
||||||
if ((*entity)->formula != LF_LOCALMIN)
|
if ((*entity)->formula != LF_LOCALMIN)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
lightmap = Lightmap_ForStyle(lightmaps, (*entity)->style, lightsurf);
|
||||||
|
|
||||||
|
hit = false;
|
||||||
sample = lightmap->samples;
|
sample = lightmap->samples;
|
||||||
surfpoint = lightsurf->points[0];
|
surfpoint = lightsurf->points[0];
|
||||||
for (j = 0; j < lightsurf->numpoints; j++, sample++, surfpoint += 3) {
|
for (j = 0; j < lightsurf->numpoints; j++, sample++, surfpoint += 3) {
|
||||||
|
|
@ -1070,10 +1076,10 @@ LightFace_Min(const lightsample_t *light,
|
||||||
if (!hit && sample->light >= 1)
|
if (!hit && sample->light >= 1)
|
||||||
hit = true;
|
hit = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (hit)
|
if (hit)
|
||||||
Lightmap_Save(lightmaps, lightsurf, lightmap, 0);
|
Lightmap_Save(lightmaps, lightsurf, lightmap, (*entity)->style);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue