qbsp: initialize 'visible' in CreateBrushWindings

This commit is contained in:
Eric Wasylishen 2022-08-28 23:15:49 -06:00
parent 3856dffc0a
commit 88a88882a9
2 changed files with 7 additions and 1 deletions

View File

@ -68,7 +68,7 @@ struct mapface_t
// with no transformations; this is for conversions only.
std::optional<extended_texinfo_t> raw_info;
bool visible = true; // can any part of this side be seen from non-void parts of the level?
bool visible; // can any part of this side be seen from non-void parts of the level?
// non-visible means we can discard the brush side
// (avoiding generating a BSP spit, so expanding it outwards)

View File

@ -280,8 +280,14 @@ bool CreateBrushWindings(bspbrush_t &brush)
}
side.w = std::move(*w);
if (side.source) {
side.source->visible = true;
}
} else {
side.w.clear();
if (side.source) {
side.source->visible = false;
}
}
}