qbsp: fix portal generation mixed water/empty detail clusters

We don't want to terminate the recursion in ClusterContents when we reach
a non-detail separator because we need to know the contents of the leafs!
This was working okay for simple cases but fails when the detail clusters
become more complex.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2013-04-21 13:05:11 +09:30
parent d3a75f6c1a
commit bb02e6d20a
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
Unreleased
* qbsp: fixed surface edge corruption when using skip surfaces
* qbsp: fixed portal generation for transparent water and detail nodes
* qbsp: added "-noskip" option for troubleshooting skip related problems
* vis: fix portal stack corruption in ClipStackWinding
* bsputil: added a "--check" option to check internal data consistency

View File

@ -54,8 +54,8 @@ ClusterContents(const node_t *node)
{
int contents0, contents1;
/* Either a leaf or non-detail node */
if (node->contents || !node->detail_separator)
/* Pass the leaf contents up the stack */
if (node->contents)
return node->contents;
contents0 = ClusterContents(node->children[0]);