]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/fog.c
Merge commit '515673c08f8718a237e90c2130a1f5294f966d6a'
[xonotic/netradiant.git] / tools / quake3 / q3map2 / fog.c
index 0cfdc924511ae260cffcdeb5108686dc5213923d..877b240e582b9fd56c554b3fbf1269a2c685084c 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -396,8 +397,6 @@ qboolean ChopFaceSurfaceByBrush( entity_t *e, mapDrawSurface_t *ds, brush_t *b )
        {
                /* get brush side and plane */
                s = &b->sides[ i ];
-               if( s->backSide )
-                       continue;
                plane = &mapplanes[ s->planenum ];
                
                /* handle coplanar outfacing (don't fog) */
@@ -409,7 +408,7 @@ qboolean ChopFaceSurfaceByBrush( entity_t *e, mapDrawSurface_t *ds, brush_t *b )
                        continue;
                
                /* general case */
-               ClipWindingEpsilon( w, plane->normal, plane->dist, ON_EPSILON, &front, &back );
+               ClipWindingEpsilonStrict( w, plane->normal, plane->dist, ON_EPSILON, &front, &back ); /* strict; if plane is "almost identical" to face, both ways to continue can be wrong, so we better not fog it */
                FreeWinding( w );
                
                if( back == NULL )
@@ -784,7 +783,7 @@ void CreateMapFogs( void )
                
                /* set up fog */
                fog = &mapFogs[ numMapFogs++ ];
-               fog->si = ShaderInfoForShader( globalFog );
+               fog->si = ShaderInfoForShaderNull( globalFog );
                if( fog->si == NULL )
                        Error( "Invalid shader \"%s\" referenced trying to add global fog", globalFog );
                fog->brush = NULL;