qbsp: clean up debug spam from DebugAreaPortalBothSidesLeak

This commit is contained in:
Eric Wasylishen 2023-03-27 20:09:01 -06:00
parent 4569ab1b33
commit 2a2bc5d966
1 changed files with 4 additions and 9 deletions

View File

@ -797,13 +797,10 @@ static void DebugAreaPortalBothSidesLeak(node_t *node)
{
std::vector<exit_t> exits = FindAreaPortalExits(node);
logging::print("found {} exits:\n", exits.size());
for (auto [exit_portal, exit_leaf] : exits) {
logging::print(
" {} ({}):\n", exit_leaf->bounds.centroid(), exit_leaf->contents.to_string(qbsp_options.target_game));
}
if (exits.size() < 2)
if (exits.size() < 2) {
logging::funcprint("WARNING: only found {} exits\n", exits.size());
return;
}
auto [exit_portal0, exit_leaf0] = exits[0];
@ -828,8 +825,6 @@ static void DebugAreaPortalBothSidesLeak(node_t *node)
return true;
});
logging::print("shortest path from exit 0 to {} is {} leafs long\n", i, path.size());
if (path.size() > longest_length) {
longest_length = path.size();
longest_path = path;
@ -859,7 +854,7 @@ static void DebugAreaPortalBothSidesLeak(node_t *node)
WriteLeakTrail(ptsfile, (*it)->bounds.centroid(), (*next_it)->bounds.centroid());
}
logging::print("Wrote {}\n", name);
logging::print("Wrote areaportal leak to {}\n", name);
++map.numareaportal_leaks;
}