qbsp: lift the hullnum check out of MarkLeakTrail
Makes it kind of obvious now that there is a bug here - if we have a small leak in hull 0 or 1 which is sealed in hull 2 (due to brush expansion), then we won't get a leak trail! Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
75ef5aa9d8
commit
d65dc77ac7
|
|
@ -142,16 +142,13 @@ MarkLeakTrail
|
||||||
*/
|
*/
|
||||||
__attribute__((noinline))
|
__attribute__((noinline))
|
||||||
static void
|
static void
|
||||||
MarkLeakTrail(portal_t *n2, const int hullnum, const int numportals)
|
MarkLeakTrail(portal_t *n2, const int numportals)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
vec3_t p1, p2;
|
vec3_t p1, p2;
|
||||||
portal_t *n1;
|
portal_t *n1;
|
||||||
vec_t *v;
|
vec_t *v;
|
||||||
|
|
||||||
if (hullnum != 2)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (numleaks > numportals)
|
if (numleaks > numportals)
|
||||||
Error(errLowLeakCount);
|
Error(errLowLeakCount);
|
||||||
|
|
||||||
|
|
@ -353,9 +350,12 @@ RecursiveFillOutside(node_t *node, bool fill, const int hullnum, const int numpo
|
||||||
for (p = node->portals; p; p = p->next[!side]) {
|
for (p = node->portals; p; p = p->next[!side]) {
|
||||||
side = (p->nodes[0] == node);
|
side = (p->nodes[0] == node);
|
||||||
if (RecursiveFillOutside(p->nodes[side], fill, hullnum, numportals)) {
|
if (RecursiveFillOutside(p->nodes[side], fill, hullnum, numportals)) {
|
||||||
// leaked, so stop filling
|
/* leaked, so stop filling */
|
||||||
if (backdraw-- > 0)
|
if (backdraw) {
|
||||||
MarkLeakTrail(p, hullnum, numportals);
|
backdraw--;
|
||||||
|
if (hullnum == 2) /* FIXME!!! */
|
||||||
|
MarkLeakTrail(p, numportals);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue