light: wip fix for two-sided liquid lighting + surface lights

This commit is contained in:
Eric Wasylishen 2023-08-28 23:33:55 -06:00
parent c42dee4749
commit b71a4ebaf1
1 changed files with 4 additions and 1 deletions

View File

@ -2010,7 +2010,10 @@ LightFace_SurfaceLight(const mbsp_t *bsp, lightsurf_t *lightsurf, lightmapdict_t
float dist = qv::length(dir);
bool use_normal = true;
if (dist == 0.0f) {
if (lightsurf->twosided) {
use_normal = false;
dir /= dist;
} else if (dist == 0.0f) {
dir = lightsurf_normal;
use_normal = false;
} else {