]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/light_bounce.c
use q3map2 from NetRadiant (VOLUNTEERS: split this commit into functional parts!)
[xonotic/netradiant.git] / tools / quake3 / q3map2 / light_bounce.c
index dba5b131500c0390a09b4fb55f0da6c45b46d107..7db00613b6fae9ea28530bb5b610335a3df922a3 100644 (file)
@@ -414,7 +414,7 @@ subdivides a radiosity winding until it is smaller than subdivide, then generate
 static void RadSubdivideDiffuseLight( int lightmapNum, bspDrawSurface_t *ds, rawLightmap_t *lm, shaderInfo_t *si,
        float scale, float subdivide, qboolean original, radWinding_t *rw, clipWork_t *cw )
 {
-       int                             i, style;
+       int                             i, style = 0;
        float                   dist, area, value;
        vec3_t                  mins, maxs, normal, d1, d2, cross, color, gradient;
        light_t                 *light, *splash;
@@ -539,7 +539,7 @@ static void RadSubdivideDiffuseLight( int lightmapNum, bspDrawSurface_t *ds, raw
        light->falloffTolerance = falloffTolerance;
        
        /* bouncing light? */
-       if( bouncing == qfalse )
+       if( !bouncing )
        {
                /* handle first-pass lights in normal q3a style */
                value = si->value;
@@ -836,6 +836,9 @@ void RadLight( int num )
        /* find nodraw bit */
        contentFlags = surfaceFlags = compileFlags = 0;
        ApplySurfaceParm( "nodraw", &contentFlags, &surfaceFlags, &compileFlags );
+
+       // jal : avoid bouncing on trans surfaces
+       ApplySurfaceParm( "trans", &contentFlags, &surfaceFlags, &compileFlags );
        
        /* early outs? */
        if( scale <= 0.0f || (si->compileFlags & C_SKY) || si->autosprite ||