don't output debug stuff if we don't need it
This commit is contained in:
parent
30868eacb7
commit
0f844ad3e2
|
|
@ -415,6 +415,7 @@ public:
|
||||||
setting_func debugoccluded;
|
setting_func debugoccluded;
|
||||||
setting_func debugneighbours;
|
setting_func debugneighbours;
|
||||||
setting_func debugmottle;
|
setting_func debugmottle;
|
||||||
|
setting_bool debug_lightgrid_octree;
|
||||||
|
|
||||||
light_settings();
|
light_settings();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -232,6 +232,7 @@ public:
|
||||||
setting_scalar scale;
|
setting_scalar scale;
|
||||||
setting_bool loghulls;
|
setting_bool loghulls;
|
||||||
setting_bool logbmodels;
|
setting_bool logbmodels;
|
||||||
|
setting_bool debug_missing_portal_sides;
|
||||||
|
|
||||||
void set_parameters(int argc, const char **argv) override;
|
void set_parameters(int argc, const char **argv) override;
|
||||||
void initialize(int argc, const char **argv) override;
|
void initialize(int argc, const char **argv) override;
|
||||||
|
|
|
||||||
|
|
@ -426,7 +426,9 @@ light_settings::light_settings()
|
||||||
debugmode = debugmodes::mottle;
|
debugmode = debugmodes::mottle;
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
&debug_group, "save mottle pattern to lightmap"}
|
&debug_group, "save mottle pattern to lightmap"},
|
||||||
|
|
||||||
|
debug_lightgrid_octree{this, "debug_lightgrid_octree", false, &debug_group, "write .octree.prt file for light grid"}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,7 @@ static std::vector<uint8_t> MakeOctreeLump(const mbsp_t &bsp, const lightgrid_ra
|
||||||
const uint32_t root_node = build_octree(qvec3i{0, 0, 0}, data.grid_size, 0);
|
const uint32_t root_node = build_octree(qvec3i{0, 0, 0}, data.grid_size, 0);
|
||||||
|
|
||||||
// visualize the leafs
|
// visualize the leafs
|
||||||
{
|
if (light_options.debug_lightgrid_octree.value()) {
|
||||||
std::vector<polylib::winding_t> windings;
|
std::vector<polylib::winding_t> windings;
|
||||||
|
|
||||||
for (auto &leaf : octree_leafs) {
|
for (auto &leaf : octree_leafs) {
|
||||||
|
|
|
||||||
|
|
@ -1179,7 +1179,7 @@ void MarkVisibleSides(tree_t &tree, bspbrush_t::container &brushes)
|
||||||
// set visible flags on the sides that are used by portals
|
// set visible flags on the sides that are used by portals
|
||||||
MarkVisibleSides_r(tree.headnode, stats);
|
MarkVisibleSides_r(tree.headnode, stats);
|
||||||
|
|
||||||
if (!stats.missing_portal_sides.empty()) {
|
if (!stats.missing_portal_sides.empty() && qbsp_options.debug_missing_portal_sides.value()) {
|
||||||
fs::path name = qbsp_options.bsp_path;
|
fs::path name = qbsp_options.bsp_path;
|
||||||
name.replace_extension("missing_portal_sides.prt");
|
name.replace_extension("missing_portal_sides.prt");
|
||||||
WriteDebugPortals(stats.missing_portal_sides, name);
|
WriteDebugPortals(stats.missing_portal_sides, name);
|
||||||
|
|
|
||||||
|
|
@ -562,7 +562,8 @@ qbsp_settings::qbsp_settings()
|
||||||
scale{this, "scale", 1.0, &map_development_group,
|
scale{this, "scale", 1.0, &map_development_group,
|
||||||
"scales the map brushes and point entity origins by a give factor"},
|
"scales the map brushes and point entity origins by a give factor"},
|
||||||
loghulls{this, {"loghulls"}, false, &logging_group, "print log output for collision hulls"},
|
loghulls{this, {"loghulls"}, false, &logging_group, "print log output for collision hulls"},
|
||||||
logbmodels{this, {"logbmodels"}, false, &logging_group, "print log output for bmodels"}
|
logbmodels{this, {"logbmodels"}, false, &logging_group, "print log output for bmodels"},
|
||||||
|
debug_missing_portal_sides{this, {"debug_missing_portal_sides"}, false, &logging_group, "output debug .prt files for missing portal sides"}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue