]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
dirtmapping: PROPERLY prevent hitting sky
authorRudolf Polzer <divverent@alientrap.org>
Sat, 30 Oct 2010 14:36:53 +0000 (16:36 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 30 Oct 2010 14:36:53 +0000 (16:36 +0200)
tools/quake3/q3map2/light_ydnar.c

index c8ca3bdeda87b06d6c9e5a5b2d938f3e3c351ff0..6f45e1ef419cc85f7c7a8c2f2f20a4f56e9003ee 100644 (file)
@@ -1476,7 +1476,7 @@ float DirtForSample( trace_t *trace )
                        
                        /* trace */
                        TraceLine( trace );
-                       if( trace->opaque )
+                       if( trace->opaque && !(trace->compileFlags & C_SKY) )
                        {
                                VectorSubtract( trace->hit, trace->origin, displacement );
                                gatherDirt += 1.0f - ooDepth * VectorLength( displacement );
@@ -1567,8 +1567,8 @@ void DirtyRawLightmap( int rawLightmapNum )
        trace.recvShadows = lm->recvShadows;
        trace.numSurfaces = lm->numLightSurfaces;
        trace.surfaces = &lightSurfaces[ lm->firstLightSurface ];
-       trace.inhibitRadius = DEFAULT_INHIBIT_RADIUS;
-       trace.testAll = qtrue;
+       trace.inhibitRadius = 0.0f;
+       trace.testAll = qfalse;
        
        /* twosided lighting (may or may not be a good idea for lightmapped stuff) */
        trace.twoSided = qfalse;