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;
|
aabb3d bounds;
|
||||||
|
|
||||||
int firstoutputfacenumber = -1;
|
std::optional<size_t> firstoutputfacenumber = std::nullopt;
|
||||||
std::optional<size_t> outputmodelnumber = std::nullopt;
|
std::optional<size_t> outputmodelnumber = std::nullopt;
|
||||||
|
|
||||||
int32_t areaportalnum = 0;
|
int32_t areaportalnum = 0;
|
||||||
|
|
|
||||||
|
|
@ -466,8 +466,7 @@ static void Brush_LoadEntity(mapentity_t *dst, mapentity_t *src, const int hulln
|
||||||
if ((qbsp_options.omitdetail.value() || qbsp_options.omitdetailfence.value()) && detail_fence)
|
if ((qbsp_options.omitdetail.value() || qbsp_options.omitdetailfence.value()) && detail_fence)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* turn solid brushes into detail, if we're in hull0 */
|
/* turn solid brushes into detail */
|
||||||
if (hullnum <= 0 && contents.is_solid(qbsp_options.target_game)) {
|
|
||||||
if (detail_illusionary) {
|
if (detail_illusionary) {
|
||||||
contents = qbsp_options.target_game->create_detail_illusionary_contents(contents);
|
contents = qbsp_options.target_game->create_detail_illusionary_contents(contents);
|
||||||
} else if (detail_fence) {
|
} else if (detail_fence) {
|
||||||
|
|
@ -475,7 +474,6 @@ static void Brush_LoadEntity(mapentity_t *dst, mapentity_t *src, const int hulln
|
||||||
} else if (detail) {
|
} else if (detail) {
|
||||||
contents = qbsp_options.target_game->create_detail_solid_contents(contents);
|
contents = qbsp_options.target_game->create_detail_solid_contents(contents);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* func_detail_illusionary don't exist in the collision hull
|
/* func_detail_illusionary don't exist in the collision hull
|
||||||
* (or bspx export) except for Q2, who needs them in there */
|
* (or bspx export) except for Q2, who needs them in there */
|
||||||
|
|
|
||||||
|
|
@ -614,7 +614,7 @@ bool FillOutside(mapentity_t *entity, tree_t *tree, const int hullnum, bspbrush_
|
||||||
settings::filltype_t filltype = qbsp_options.filltype.value();
|
settings::filltype_t filltype = qbsp_options.filltype.value();
|
||||||
|
|
||||||
if (filltype == settings::filltype_t::AUTO) {
|
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) {
|
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);
|
ExportObj_Marksurfaces("pre_makefaceedges_marksurfaces", tree->headnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_assert(entity->firstoutputfacenumber == -1);
|
Q_assert(!entity->firstoutputfacenumber.has_value());
|
||||||
|
|
||||||
entity->firstoutputfacenumber = MakeFaceEdges(tree->headnode);
|
entity->firstoutputfacenumber = MakeFaceEdges(tree->headnode);
|
||||||
|
|
||||||
|
|
@ -570,7 +570,7 @@ static void ProcessEntity(mapentity_t *entity, const int hullnum)
|
||||||
ExportBrushList(entity, tree->headnode);
|
ExportBrushList(entity, tree->headnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportDrawNodes(entity, tree->headnode, entity->firstoutputfacenumber);
|
ExportDrawNodes(entity, tree->headnode, entity->firstoutputfacenumber.value());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue