always use inside filling for auto
allow details in hulls use std::optional for an optional-esque value
This commit is contained in:
parent
97665d15a9
commit
20f5d73a3c
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue