From b305ddaed96a8d3645f86818647a568788f865ae Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 25 Aug 2022 21:45:33 -0400 Subject: [PATCH] port over the visible = true setting for hint sides --- include/qbsp/outside.hh | 1 + qbsp/outside.cc | 6 +++++- qbsp/portals.cc | 8 +------- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/qbsp/outside.hh b/include/qbsp/outside.hh index 2cdb5283..6ef061a1 100644 --- a/include/qbsp/outside.hh +++ b/include/qbsp/outside.hh @@ -29,5 +29,6 @@ struct tree_t; bool FillOutside(tree_t &tree, hull_index_t hullnum, bspbrush_t::container &brushes); std::vector FindOccupiedClusters(node_t *headnode); +void MarkBrushSidesInvisible(bspbrush_t::container &brushes); void FillBrushEntity(tree_t &tree, hull_index_t hullnum, bspbrush_t::container &brushes); diff --git a/qbsp/outside.cc b/qbsp/outside.cc index 0b6fb8b9..918a2067 100644 --- a/qbsp/outside.cc +++ b/qbsp/outside.cc @@ -349,12 +349,16 @@ std::vector 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 + } } } } diff --git a/qbsp/portals.cc b/qbsp/portals.cc index b09debcb..a10a161f 100644 --- a/qbsp/portals.cc +++ b/qbsp/portals.cc @@ -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