From 43ab4171d74f7812733265af7ffb8f318aa1d0bf Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Mon, 30 May 2016 02:00:22 -0600 Subject: [PATCH] light: store bsp in lightsurf for convenience --- include/light/light.h | 1 + light/ltface.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/light/light.h b/include/light/light.h index dfba8aa4..87d8c94d 100644 --- a/include/light/light.h +++ b/include/light/light.h @@ -95,6 +95,7 @@ typedef struct { /*Warning: this stuff needs explicit initialisation*/ typedef struct { const modelinfo_t *modelinfo; + const bsp2_t *bsp; const bsp2_dface_t *face; /* these take precedence the values in modelinfo */ lightsample_t minlight; diff --git a/light/ltface.c b/light/ltface.c index 5f737816..b2bacdb1 100644 --- a/light/ltface.c +++ b/light/ltface.c @@ -855,6 +855,7 @@ Lightsurf_Init(const modelinfo_t *modelinfo, const bsp2_dface_t *face, /*FIXME: memset can be slow on large datasets*/ // memset(lightsurf, 0, sizeof(*lightsurf)); lightsurf->modelinfo = modelinfo; + lightsurf->bsp = bsp; lightsurf->face = face; if (facesup)