Don't remove the facet is there is no border planeCM_PlaneEqual

This commit is contained in:
smallmodel 2024-06-23 17:19:52 +02:00
parent 0a6c745ffb
commit 303ed30a38
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -766,10 +766,6 @@ static qboolean CM_ValidateFacet( facet_t *facet ) {
Vector4Copy( planes[ facet->surfacePlane ].plane, plane );
w = BaseWindingForPlane( plane, plane[3] );
for ( j = 0 ; j < facet->numBorders && w ; j++ ) {
if ( facet->borderPlanes[j] == -1 ) {
FreeWinding( w );
return qfalse;
}
Vector4Copy( planes[ facet->borderPlanes[j] ].plane, plane );
if ( !facet->borderInward[j] ) {
VectorSubtract( vec3_origin, plane, plane );
@ -790,12 +786,6 @@ static qboolean CM_ValidateFacet( facet_t *facet ) {
if ( bounds[1][j] - bounds[0][j] > MAX_MAP_BOUNDS ) {
return qfalse; // we must be missing a plane
}
if ( bounds[0][j] >= MAX_MAP_BOUNDS ) {
return qfalse;
}
if ( bounds[1][j] <= -MAX_MAP_BOUNDS ) {
return qfalse;
}
}
return qtrue; // winding is fine
}
@ -1314,7 +1304,7 @@ void CM_TracePointThroughPatchCollide( traceWork_t *tw, const struct patchCollid
}
for ( j = 0 ; j < facet->numBorders ; j++ ) {
k = facet->borderPlanes[j];
if ( frontFacing[k] ^ facet->borderInward[j] ) {
if ( frontFacing[k] != facet->borderInward[j] ) {
if ( intersection[k] > intersect ) {
break;
}