always use inside filling for auto

allow details in hulls
use std::optional for an optional-esque value
This commit is contained in:
Jonathan 2022-08-15 04:53:36 -04:00
parent 97665d15a9
commit 20f5d73a3c
4 changed files with 11 additions and 13 deletions

View File

@ -124,7 +124,7 @@ public:
aabb3d bounds;
int firstoutputfacenumber = -1;
std::optional<size_t> firstoutputfacenumber = std::nullopt;
std::optional<size_t> outputmodelnumber = std::nullopt;
int32_t areaportalnum = 0;

View File

@ -466,15 +466,13 @@ static void Brush_LoadEntity(mapentity_t *dst, mapentity_t *src, const int hulln
if ((qbsp_options.omitdetail.value() || qbsp_options.omitdetailfence.value()) && detail_fence)
continue;
/* turn solid brushes into detail, if we're in hull0 */
if (hullnum <= 0 && contents.is_solid(qbsp_options.target_game)) {
if (detail_illusionary) {
contents = qbsp_options.target_game->create_detail_illusionary_contents(contents);
} else if (detail_fence) {
contents = qbsp_options.target_game->create_detail_fence_contents(contents);
} else if (detail) {
contents = qbsp_options.target_game->create_detail_solid_contents(contents);
}
/* turn solid brushes into detail */
if (detail_illusionary) {
contents = qbsp_options.target_game->create_detail_illusionary_contents(contents);
} else if (detail_fence) {
contents = qbsp_options.target_game->create_detail_fence_contents(contents);
} else if (detail) {
contents = qbsp_options.target_game->create_detail_solid_contents(contents);
}
/* func_detail_illusionary don't exist in the collision hull

View File

@ -614,7 +614,7 @@ bool FillOutside(mapentity_t *entity, tree_t *tree, const int hullnum, bspbrush_
settings::filltype_t filltype = qbsp_options.filltype.value();
if (filltype == settings::filltype_t::AUTO) {
filltype = hullnum > 0 ? settings::filltype_t::OUTSIDE : settings::filltype_t::INSIDE;
filltype = settings::filltype_t::INSIDE;
}
if (filltype == settings::filltype_t::INSIDE) {

View File

@ -562,7 +562,7 @@ static void ProcessEntity(mapentity_t *entity, const int hullnum)
ExportObj_Marksurfaces("pre_makefaceedges_marksurfaces", tree->headnode);
}
Q_assert(entity->firstoutputfacenumber == -1);
Q_assert(!entity->firstoutputfacenumber.has_value());
entity->firstoutputfacenumber = MakeFaceEdges(tree->headnode);
@ -570,7 +570,7 @@ static void ProcessEntity(mapentity_t *entity, const int hullnum)
ExportBrushList(entity, tree->headnode);
}
ExportDrawNodes(entity, tree->headnode, entity->firstoutputfacenumber);
ExportDrawNodes(entity, tree->headnode, entity->firstoutputfacenumber.value());
}
}