parent
ee256f339e
commit
74e1a0f6f0
11
vis/flow.cc
11
vis/flow.cc
|
|
@ -168,8 +168,11 @@ RecursiveLeafFlow(int leafnum, threaddata_t *thread, pstack_t *prevstack)
|
||||||
*/
|
*/
|
||||||
err = CheckStack(leaf, thread);
|
err = CheckStack(leaf, thread);
|
||||||
if (err) {
|
if (err) {
|
||||||
logprint("WARNING: %s: recursion on leaf %d\n", __func__, leafnum);
|
// ericw -- this seems harmless and the fix for https://github.com/ericwa/ericw-tools/issues/261
|
||||||
LogLeaf(leaf);
|
// causes it to happen a lot.
|
||||||
|
|
||||||
|
//logprint("WARNING: %s: recursion on leaf %d\n", __func__, leafnum);
|
||||||
|
//LogLeaf(leaf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -457,7 +460,7 @@ BasePortalThread(void *dummy)
|
||||||
|
|
||||||
for (j = 0; j < tw->numpoints; j++) {
|
for (j = 0; j < tw->numpoints; j++) {
|
||||||
d = DotProduct(tw->points[j], p->plane.normal) - p->plane.dist;
|
d = DotProduct(tw->points[j], p->plane.normal) - p->plane.dist;
|
||||||
if (d > ON_EPSILON)
|
if (d > -ON_EPSILON) // ericw -- changed from > ON_EPSILON for https://github.com/ericwa/ericw-tools/issues/261
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (j == tw->numpoints)
|
if (j == tw->numpoints)
|
||||||
|
|
@ -470,7 +473,7 @@ BasePortalThread(void *dummy)
|
||||||
|
|
||||||
for (j = 0; j < w->numpoints; j++) {
|
for (j = 0; j < w->numpoints; j++) {
|
||||||
d = DotProduct(w->points[j], tp->plane.normal) - tp->plane.dist;
|
d = DotProduct(w->points[j], tp->plane.normal) - tp->plane.dist;
|
||||||
if (d < -ON_EPSILON)
|
if (d < ON_EPSILON) // ericw -- changed from < -ON_EPSILON for https://github.com/ericwa/ericw-tools/issues/261
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (j == w->numpoints)
|
if (j == w->numpoints)
|
||||||
|
|
|
||||||
14
vis/vis.cc
14
vis/vis.cc
|
|
@ -283,6 +283,12 @@ ClipStackWinding(winding_t *in, pstack_t *stack, plane_t *split)
|
||||||
sides[i] = sides[0];
|
sides[i] = sides[0];
|
||||||
dists[i] = dists[0];
|
dists[i] = dists[0];
|
||||||
|
|
||||||
|
// ericw -- coplanar portals: return without clipping. Otherwise when two portals are less than ON_EPSILON apart,
|
||||||
|
// one will get fully clipped away and we can't see through it causing https://github.com/ericwa/ericw-tools/issues/261
|
||||||
|
if (counts[SIDE_ON] == in->numpoints) {
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
if (!counts[0]) {
|
if (!counts[0]) {
|
||||||
FreeStackWinding(in, stack);
|
FreeStackWinding(in, stack);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -654,8 +660,12 @@ ClusterFlow(int clusternum, leafbits_t *buffer)
|
||||||
for (j = 0; j < numblocks; j++)
|
for (j = 0; j < numblocks; j++)
|
||||||
buffer->bits[j] |= p->visbits->bits[j];
|
buffer->bits[j] |= p->visbits->bits[j];
|
||||||
}
|
}
|
||||||
if (TestLeafBit(buffer, clusternum))
|
|
||||||
logprint("WARNING: Leaf portals saw into cluster (%i)\n", clusternum);
|
// ericw -- this seems harmless and the fix for https://github.com/ericwa/ericw-tools/issues/261
|
||||||
|
// causes it to happen a lot.
|
||||||
|
//if (TestLeafBit(buffer, clusternum))
|
||||||
|
// logprint("WARNING: Leaf portals saw into cluster (%i)\n", clusternum);
|
||||||
|
|
||||||
SetLeafBit(buffer, clusternum);
|
SetLeafBit(buffer, clusternum);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue