qbsp: flag when a surface/node is a detail separator
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
32b94e4843
commit
da3aa26ee5
|
|
@ -396,6 +396,7 @@ typedef struct surface_s {
|
|||
vec3_t mins, maxs;
|
||||
bool onnode; // true if surface has already been used
|
||||
// as a splitting node
|
||||
bool detail_separator; // true if generated by a detail brush
|
||||
face_t *faces; // links to all faces on either side of the surf
|
||||
} surface_t;
|
||||
|
||||
|
|
@ -420,6 +421,7 @@ typedef struct node_s {
|
|||
int visleafnum; // -1 = solid
|
||||
int valid; // for flood filling
|
||||
int occupied; // entity number in leaf for outside filling
|
||||
bool detail_separator; // for vis portal generation
|
||||
} node_t;
|
||||
|
||||
//=============================================================================
|
||||
|
|
|
|||
|
|
@ -358,8 +358,10 @@ ChoosePlaneFromList(surface_t *surfaces, vec3_t mins, vec3_t maxs)
|
|||
}
|
||||
|
||||
/* If we found a candidate on first pass, don't do a second pass */
|
||||
if (bestsurface)
|
||||
if (pass > 0 && bestsurface) {
|
||||
bestsurface->detail_separator = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return bestsurface;
|
||||
|
|
@ -704,6 +706,7 @@ PartitionSurfaces(surface_t *surfaces, node_t *node)
|
|||
node->children[0] = AllocMem(NODE, 1, true);
|
||||
node->children[1] = AllocMem(NODE, 1, true);
|
||||
node->planenum = split->planenum;
|
||||
node->detail_separator = split->detail_separator;
|
||||
|
||||
splitplane = &map.planes[split->planenum];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue