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:
parent
0642ad16d3
commit
97665d15a9
|
|
@ -199,7 +199,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
// Heap storage; uses a vector.
|
||||
struct winding_storage_heap_t
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue