From 00bb22e458a7b53cecfcc413fe79e5de902c07df Mon Sep 17 00:00:00 2001 From: Garux Date: Tue, 19 Mar 2019 16:54:23 +0300 Subject: [PATCH] q3map2 * fix unwanted culling of both matching brush faces --- tools/quake3/q3map2/surface.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/quake3/q3map2/surface.c b/tools/quake3/q3map2/surface.c index 3654beec..35544c34 100644 --- a/tools/quake3/q3map2/surface.c +++ b/tools/quake3/q3map2/surface.c @@ -1631,6 +1631,8 @@ qboolean SideInBrush( side_t *side, brush_t *b ){ if ( s == SIDE_FRONT || s == SIDE_CROSS ) { return qfalse; } + if( s == SIDE_ON && b->sides[ i ].culled && DotProduct( ( mapplanes[ side->planenum ].normal ), ( plane->normal ) ) > 0 ) /* don't cull by freshly culled with matching plane */ + return qfalse; } /* don't cull autosprite or polygonoffset surfaces */ @@ -1827,6 +1829,8 @@ void CullSides( entity_t *e ){ side2->culled = qtrue; g_numCoinFaces++; } + + // TODO ? this culls only one of face-to-face windings; SideInBrush culls both tho; is this needed at all or should be improved? } } }