From: Rudolf Polzer Date: Sat, 30 Oct 2010 14:36:53 +0000 (+0200) Subject: dirtmapping: PROPERLY prevent hitting sky X-Git-Tag: xonotic-v0.5.0~164 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=aa00101d5ec781aaacc755e5409d10c01956964d;p=xonotic%2Fnetradiant.git dirtmapping: PROPERLY prevent hitting sky --- diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index c8ca3bde..6f45e1ef 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -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;