From 722f753d8d7d2af0cc1f829b65e2e71ebb2bbfce Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Mon, 19 Sep 2016 19:21:04 -0600 Subject: [PATCH] light: remove some unused vis-testing stuff --- include/light/entities.hh | 3 --- include/light/light.hh | 1 - light/entities.cc | 9 --------- light/light.cc | 1 - 4 files changed, 14 deletions(-) diff --git a/include/light/entities.hh b/include/light/entities.hh index b491c973..7c61f9e1 100644 --- a/include/light/entities.hh +++ b/include/light/entities.hh @@ -65,8 +65,6 @@ public: qboolean generated; // if true, don't write to the bsp - const bsp2_dleaf_t *leaf; // for vis testing - const char *classname() const; vec3_t mins, maxs; @@ -91,7 +89,6 @@ public: epairs {nullptr}, targetent {nullptr}, generated {false}, - leaf {nullptr}, // settings diff --git a/include/light/light.hh b/include/light/light.hh index 6ddf0a74..149ea8ef 100644 --- a/include/light/light.hh +++ b/include/light/light.hh @@ -174,7 +174,6 @@ typedef struct { vec3_t color; vec3_t surfnormal; vec_t area; - const bsp2_dleaf_t *leaf; /* estimated visible AABB culling */ vec3_t mins; diff --git a/light/entities.cc b/light/entities.cc index 1df9b4c3..d6919d9f 100644 --- a/light/entities.cc +++ b/light/entities.cc @@ -814,14 +814,6 @@ static miptex_t *FindProjectionTexture(const bsp2_t *bsp, const char *texname) return NULL; } -static void -SetupLightLeafnums(const bsp2_t *bsp) -{ - for (light_t &entity : all_lights) { - entity.leaf = Light_PointInLeaf(bsp, *entity.origin.vec3Value()); - } -} - /* * ================== * EntData_Parse @@ -1253,7 +1245,6 @@ SetupLights(const globalconfig_t &cfg, const bsp2_t *bsp) SetupSuns(cfg); SetupSkyDome(cfg); FixLightsOnFaces(bsp); - SetupLightLeafnums(bsp); EstimateLightVisibility(); logprint("Final count: %d lights %d suns in use.\n", diff --git a/light/light.cc b/light/light.cc index 437331d0..a9ec876a 100644 --- a/light/light.cc +++ b/light/light.cc @@ -924,7 +924,6 @@ AddBounceLight(const vec3_t pos, const vec3_t color, const vec3_t surfnormal, ve VectorCopy(color, l.color); VectorCopy(surfnormal, l.surfnormal); l.area = area; - l.leaf = Light_PointInLeaf(bsp, pos); if (!novisapprox) { EstimateVisibleBoundsAtPoint(pos, l.mins, l.maxs);