only generate bounds if rays is enabled

don't lightmap sky again
This commit is contained in:
Jonathan 2022-07-01 22:41:46 -04:00
parent f3df01472e
commit b0ae7d86bf
2 changed files with 5 additions and 3 deletions

View File

@ -391,9 +391,9 @@ struct gamedef_q2_t : public gamedef_t
max_entity_key = 256;
}
bool surf_is_lightmapped(const surfflags_t &flags) const override { return !(flags.native & Q2_SURF_NODRAW); }
bool surf_is_lightmapped(const surfflags_t &flags) const override { return !(flags.native & (Q2_SURF_NODRAW | Q2_SURF_SKY)); }
bool surf_is_subdivided(const surfflags_t &flags) const override { return true; }
bool surf_is_subdivided(const surfflags_t &flags) const override { return !(flags.native & Q2_SURF_SKY); }
bool surfflags_are_valid(const surfflags_t &flags) const override
{

View File

@ -111,7 +111,9 @@ static void MakeSurfaceLight(const mbsp_t *bsp, const settings::worldspawn_keys
l.style = style;
// Init bbox...
l.bounds = EstimateVisibleBoundsAtPoint(facemidpoint);
if (options.visapprox.value() == visapprox_t::RAYS) {
l.bounds = EstimateVisibleBoundsAtPoint(facemidpoint);
}
for (auto &pt : points) {
if (options.visapprox.value() == visapprox_t::VIS) {