port over the visible = true setting for hint sides

This commit is contained in:
Jonathan 2022-08-25 21:45:33 -04:00
parent f581c071e8
commit b305ddaed9
3 changed files with 7 additions and 8 deletions

View File

@ -29,5 +29,6 @@ struct tree_t;
bool FillOutside(tree_t &tree, hull_index_t hullnum, bspbrush_t::container &brushes);
std::vector<node_t *> FindOccupiedClusters(node_t *headnode);
void MarkBrushSidesInvisible(bspbrush_t::container &brushes);
void FillBrushEntity(tree_t &tree, hull_index_t hullnum, bspbrush_t::container &brushes);

View File

@ -349,12 +349,16 @@ std::vector<node_t *> FindOccupiedClusters(node_t *headnode)
//=============================================================================
static void MarkBrushSidesInvisible(bspbrush_t::container &brushes)
void MarkBrushSidesInvisible(bspbrush_t::container &brushes)
{
for (auto &brush : brushes) {
for (auto &face : brush->sides) {
if (face.source) {
face.source->visible = false;
if (face.source->get_texinfo().flags.is_hint) {
face.source->visible = true; // hints are always visible
}
}
}
}

View File

@ -914,13 +914,7 @@ void MarkVisibleSides(tree_t &tree, bspbrush_t::container &brushes)
logging::funcheader();
// clear all the visible flags
for (auto &brush : brushes) {
for (auto &face : brush->sides) {
if (face.source) {
face.source->visible = false;
}
}
}
MarkBrushSidesInvisible(brushes);
visible_faces_stats_t stats;
// set visible flags on the sides that are used by portals