fix slight mistype in Brush_LoadEntity

make ~settings_container virtual so light_t can be freed properly
reset visible to false on all brush sides
This commit is contained in:
Jonathan 2022-08-15 03:37:38 -04:00
parent 0642ad16d3
commit 97665d15a9
5 changed files with 10 additions and 4 deletions

View File

@ -199,7 +199,6 @@ public:
}
};
// Heap storage; uses a vector.
struct winding_storage_heap_t
{

View File

@ -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;

View File

@ -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 */

View File

@ -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;
}

View File

@ -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));