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