q3map2: don't store lightmap if the last bounce computation ran empty.

This commit is contained in:
Matthias Krüger 2015-09-03 02:29:27 +02:00 committed by Garux
parent 39f4bdfab6
commit 374f66bb42

View File

@ -1939,7 +1939,7 @@ static void LightWorld( bool fastAllocate ){
SetupEnvelopes( false, fastbounce ); SetupEnvelopes( false, fastbounce );
if ( lights.empty() ) { if ( lights.empty() ) {
Sys_Printf( "No diffuse light to calculate, ending radiosity.\n" ); Sys_Printf( "No diffuse light to calculate, ending radiosity.\n" );
break; return;
} }
/* add to lightgrid */ /* add to lightgrid */
@ -1982,6 +1982,8 @@ static void LightWorld( bool fastAllocate ){
bounce--; bounce--;
b++; b++;
} }
/* ydnar: store off lightmaps */
StoreSurfaceLightmaps( fastAllocate );
} }
@ -2814,9 +2816,6 @@ int LightMain( Args& args ){
/* light the world */ /* light the world */
LightWorld( fastAllocate ); LightWorld( fastAllocate );
/* ydnar: store off lightmaps */
StoreSurfaceLightmaps( fastAllocate );
/* write out the bsp */ /* write out the bsp */
UnparseEntities(); UnparseEntities();
Sys_Printf( "Writing %s\n", source ); Sys_Printf( "Writing %s\n", source );