qbsp: fix invalid leaf bounds in MakeTreePortals_r

This commit is contained in:
Eric Wasylishen 2022-06-18 16:13:00 -06:00
parent ccf605794e
commit 3492ef2b9e
1 changed files with 4 additions and 0 deletions

View File

@ -349,6 +349,10 @@ void MakeTreePortals_r(node_t *node, portalstats_t &stats)
if (node->bounds.mins()[0] >= node->bounds.maxs()[0])
{
printf ("WARNING: node without a volume\n");
// fixme-brushbsp: added this to work around leafs with no portals showing up in "qbspfeatures.map" among other
// test maps. Not sure if correct or there's another underlying problem.
node->bounds = { node->parent->bounds.mins(), node->parent->bounds.mins() };
}
for (int i = 0; i < 3; i++)