From: Matthias Krüger Date: Thu, 3 Sep 2015 00:29:27 +0000 (+0200) Subject: q3map2: don't store lightmap if the last bounce computation ran empty. X-Git-Tag: xonotic-v0.8.2^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=72e497d809e1e68353efb8b2c259a2203951480b;p=xonotic%2Fnetradiant.git q3map2: don't store lightmap if the last bounce computation ran empty. --- diff --git a/tools/quake3/q3map2/light.c b/tools/quake3/q3map2/light.c index 2571d4d2..78e3c817 100644 --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@ -2054,7 +2054,7 @@ void LightWorld( const char *BSPFilePath, qboolean fastAllocate ){ SetupEnvelopes( qfalse, fastbounce ); if ( numLights == 0 ) { Sys_Printf( "No diffuse light to calculate, ending radiosity.\n" ); - break; + return; } /* add to lightgrid */ @@ -2097,6 +2097,8 @@ void LightWorld( const char *BSPFilePath, qboolean fastAllocate ){ bounce--; b++; } + /* ydnar: store off lightmaps */ + StoreSurfaceLightmaps( fastAllocate ); } @@ -2992,9 +2994,6 @@ int LightMain( int argc, char **argv ){ /* light the world */ LightWorld( BSPFilePath, fastAllocate ); - /* ydnar: store off lightmaps */ - StoreSurfaceLightmaps( fastAllocate ); - /* write out the bsp */ UnparseEntities(); Sys_Printf( "Writing %s\n", BSPFilePath );