]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/lightmaps_ydnar.c
new option -rawlightmapsizelimit to limit the size of RAW lightmaps (so you can use...
[xonotic/netradiant.git] / tools / quake3 / q3map2 / lightmaps_ydnar.c
index 3c1eed65c84d05f0027f95e9da655dcefdda2707..252188e915952b05012051a90bf35ecb5ca21e14 100644 (file)
@@ -678,14 +678,14 @@ qboolean AddSurfaceToRawLightmap( int num, rawLightmap_t *lm )
                size[ i ] = (maxs[ i ] - mins[ i ]) / sampleSize + 1.0f;
                
                /* hack (god this sucks) */
-               if( size[ i ] > lm->customWidth || size[ i ] > lm->customHeight )
+               if( size[ i ] > lm->customWidth || size[ i ] > lm->customHeight  || size[i] > lmLimitSize)
                {
                        i = -1;
                        sampleSize += 1.0f;
                }
        }
 
-       if(sampleSize != lm->sampleSize)
+       if(sampleSize != lm->sampleSize && lmLimitSize == 0)
        {
                Sys_FPrintf(SYS_VRB,"WARNING: surface at (%6.0f %6.0f %6.0f) (%6.0f %6.0f %6.0f) too large for desired samplesize/lightmapsize/lightmapscale combination, increased samplesize from %d to %d\n",
                        info->mins[0],