From f12cefb2c9843133b0054a46b55a7c46f834b3f0 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 26 Mar 2023 19:02:25 -0600 Subject: [PATCH] qbsp: if Q2_CONTENTS_SOLID bit is set, always assign invalid area --- qbsp/writebsp.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/qbsp/writebsp.cc b/qbsp/writebsp.cc index b1506af4..528b7156 100644 --- a/qbsp/writebsp.cc +++ b/qbsp/writebsp.cc @@ -193,12 +193,14 @@ static void ExportLeaf(node_t *node) } dleaf.nummarksurfaces = static_cast(map.bsp.dleaffaces.size()) - dleaf.firstmarksurface; - if (map.leakfile) { - if (!(dleaf.contents & Q2_CONTENTS_SOLID)) { - dleaf.area = 1; - } + if (dleaf.contents & Q2_CONTENTS_SOLID) { + dleaf.area = AREA_INVALID; } else { - dleaf.area = node->area; + if (map.leakfile) { + dleaf.area = 1; + } else { + dleaf.area = node->area; + } } dleaf.cluster = node->viscluster;