From 3492ef2b9eaa722e0b3d114f5bf28d87edb015cf Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sat, 18 Jun 2022 16:13:00 -0600 Subject: [PATCH] qbsp: fix invalid leaf bounds in MakeTreePortals_r --- qbsp/portals.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qbsp/portals.cc b/qbsp/portals.cc index 59a23a19..83b0167e 100644 --- a/qbsp/portals.cc +++ b/qbsp/portals.cc @@ -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++)