From 2d0ede48cfd12772c7dd47ccfbfa6f89abf3ffeb Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Tue, 31 May 2016 18:18:25 -0600 Subject: [PATCH] light: FixLightOnFace: only check against model 0, otherwise triggers etc. are wrongly considered to block lights --- light/entities.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/light/entities.c b/light/entities.c index d1010b43..4c52fc79 100644 --- a/light/entities.c +++ b/light/entities.c @@ -1237,18 +1237,10 @@ static bool Light_PointInSolid_r(const bsp2_t *bsp, int nodenum, const vec3_t po } } +// only check hull 0 of model 0 (world) bool Light_PointInSolid(const bsp2_t *bsp, const vec3_t point ) { - /* check all models */ - for (int i=0; inummodels; i++) { - - // TODO: Take the model offset into account - - if (Light_PointInSolid_r(bsp, bsp->dmodels[i].headnode[0], point)) - return true; - } - - return false; + return Light_PointInSolid_r(bsp, bsp->dmodels[0].headnode[0], point); } static void