qbsp: DividePlane: add missing recalculation of surface bbox for the parallel case.

Thanks to rebb for the idea, txqbsp has the workaround in SelectPartition that recomputes the surface bbox; I think this fixes the underlying bug though.

Note: this makes telefragged.map (from the RRP devkit) leak in hull 2.
However, the point file starts at a func_detail staircase that, if turned into func_wall, fixes the leak.
This commit is contained in:
Eric Wasylishen 2015-09-12 23:22:43 -06:00
parent 3322ffb8f3
commit 7e7d851fdb
1 changed files with 11 additions and 0 deletions

View File

@ -524,6 +524,17 @@ DividePlane(surface_t *in, plane_t *split, surface_t **front,
}
}
// ericw -- added these CalcSurfaceInfo to recalculate the surf bbox.
// pretty sure their omission here was a bug.
// It's tied to options.maxNodeSize because that change needs
// valid bboxes to work well (txqbsp-xt calculated the node bbox from
// faces in SelectPartition)
if (options.maxNodeSize >= 64) {
// recalc bboxes and flags
CalcSurfaceInfo(newsurf);
CalcSurfaceInfo(in);
}
if (in->faces)
*front = in;
else