diff --git a/include/common/polylib.hh b/include/common/polylib.hh index db9b7103..6148b7ab 100644 --- a/include/common/polylib.hh +++ b/include/common/polylib.hh @@ -199,7 +199,6 @@ public: } }; - // Heap storage; uses a vector. struct winding_storage_heap_t { diff --git a/include/common/settings.hh b/include/common/settings.hh index 176a8161..513752dd 100644 --- a/include/common/settings.hh +++ b/include/common/settings.hh @@ -705,7 +705,7 @@ public: inline setting_container() { } - ~setting_container(); + virtual ~setting_container(); // copy constructor (can't be copyable, see setting_base) setting_container(const setting_container &other) = delete; diff --git a/qbsp/brush.cc b/qbsp/brush.cc index 79a1bb01..604847ee 100644 --- a/qbsp/brush.cc +++ b/qbsp/brush.cc @@ -525,7 +525,7 @@ static void Brush_LoadEntity(mapentity_t *dst, mapentity_t *src, const int hulln } /* nonsolid brushes don't show up in clipping hulls */ - if (hullnum > 0 && !contents.is_solid(qbsp_options.target_game) && !contents.is_sky(qbsp_options.target_game)) + if (hullnum > 0 && !contents.is_any_solid(qbsp_options.target_game) && !contents.is_sky(qbsp_options.target_game)) continue; /* sky brushes are solid in the collision hulls */ diff --git a/qbsp/qbsp.cc b/qbsp/qbsp.cc index faa0b147..96cad13e 100644 --- a/qbsp/qbsp.cc +++ b/qbsp/qbsp.cc @@ -794,6 +794,13 @@ static void CreateSingleHull(const int hullnum) ProcessEntity(&entity, hullnum); + // reset any global brush stuff + for (auto &brush : entity.mapbrushes) { + for (auto &side : brush.faces) { + side.visible = false; + } + } + // restore logging logging::mask = prev_logging_mask; } diff --git a/tests/test_qbsp.cc b/tests/test_qbsp.cc index 4ad84f1e..e19aea3b 100644 --- a/tests/test_qbsp.cc +++ b/tests/test_qbsp.cc @@ -1860,7 +1860,7 @@ TEST_CASE("q1_hull1_content_types", "[testmaps_q1]") {{448, -64, 0}, {CONTENTS_EMPTY, CONTENTS_EMPTY}} // func_detail_illusionary + _mirrorinside is empty in hull1 }; - for (const auto [point, expected_types] : expected) { + for (const auto &[point, expected_types] : expected) { INFO("Testing point " << point); CHECK(expected_types.hull0_contenttype == BSP_FindContentsAtPoint(&bsp, 0, &bsp.dmodels[0], point));