From b71a4ebaf172d8570ae42c2d15a14e3991fb919e Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Mon, 28 Aug 2023 23:33:55 -0600 Subject: [PATCH] light: wip fix for two-sided liquid lighting + surface lights --- light/ltface.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/light/ltface.cc b/light/ltface.cc index e302a6e6..fdb36f32 100644 --- a/light/ltface.cc +++ b/light/ltface.cc @@ -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 {