]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/light.c
Merge branch 'sysfprintf' into 'master'
[xonotic/netradiant.git] / tools / quake3 / q3map2 / light.c
index 14a69ae8978576c17ca1014fa704bb1b904f809d..c340b9dc03753139f4e65f70dc4c9a94b9974534 100644 (file)
@@ -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 );