From aa00101d5ec781aaacc755e5409d10c01956964d Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 30 Oct 2010 16:36:53 +0200 Subject: [PATCH] dirtmapping: PROPERLY prevent hitting sky --- tools/quake3/q3map2/light_ydnar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index c8ca3bd..6f45e1e 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; -- 2.39.2