From 72a0a92d3af049e773bb1dd9be706f3a537bcff5 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 13 Feb 2023 20:41:11 -0500 Subject: [PATCH] fix area assertion/test failure --- qbsp/writebsp.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/qbsp/writebsp.cc b/qbsp/writebsp.cc index 44f59a40..f2286029 100644 --- a/qbsp/writebsp.cc +++ b/qbsp/writebsp.cc @@ -193,7 +193,14 @@ static void ExportLeaf(node_t *node) } dleaf.nummarksurfaces = static_cast(map.bsp.dleaffaces.size()) - dleaf.firstmarksurface; - dleaf.area = node->area; + if (map.leakfile) { + if (!(dleaf.contents & Q2_CONTENTS_SOLID)) { + dleaf.area = 1; + } + } else { + dleaf.area = node->area; + } + dleaf.cluster = node->viscluster; dleaf.firstleafbrush = node->firstleafbrush; dleaf.numleafbrushes = node->numleafbrushes;