light: store bsp in lightsurf for convenience

This commit is contained in:
Eric Wasylishen 2016-05-30 02:00:22 -06:00
parent 280aadfbd8
commit 43ab4171d7
2 changed files with 2 additions and 0 deletions

View File

@ -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;

View File

@ -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)