light: fix antilights which were broken with the light culling change
This commit is contained in:
parent
12132795cb
commit
b3472d89e7
|
|
@ -820,8 +820,9 @@ CullLight(const entity_t *entity, const lightsurf_t *lightsurf)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* return true if the light level at the closest point on the
|
/* return true if the light level at the closest point on the
|
||||||
surface bounding sphere to the light source is <= fadegate */
|
surface bounding sphere to the light source is <= fadegate.
|
||||||
return GetLightValue(&entity->light, entity, dist) <= fadegate;
|
need fabs to handle antilights. */
|
||||||
|
return fabs(GetLightValue(&entity->light, entity, dist)) <= fadegate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -868,7 +869,7 @@ LightFace_Entity(const entity_t *entity, const lightsample_t *light,
|
||||||
dist = VectorLength(ray);
|
dist = VectorLength(ray);
|
||||||
|
|
||||||
/* Quick distance check first */
|
/* Quick distance check first */
|
||||||
if (GetLightValue(&entity->light, entity, dist) <= fadegate)
|
if (fabs(GetLightValue(&entity->light, entity, dist)) <= fadegate)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Check spotlight cone */
|
/* Check spotlight cone */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue