Merge pull request #432 from matthiaskrgr/no_redundant_store

q3map2: don't store lightmap if the last bounce computation ran empty.
This commit is contained in:
Timothee "TTimo" Besset 2017-03-13 10:37:03 -05:00 committed by GitHub
commit 1be104fb48

View file

@ -1772,7 +1772,7 @@ void LightWorld( void ){
SetupEnvelopes( qfalse, fastbounce );
if ( numLights == 0 ) {
Sys_Printf( "No diffuse light to calculate, ending radiosity.\n" );
break;
return;
}
/* add to lightgrid */
@ -1813,6 +1813,9 @@ void LightWorld( void ){
bounce--;
b++;
}
/* ydnar: store off lightmaps */
StoreSurfaceLightmaps();
}
@ -2301,9 +2304,6 @@ int LightMain( int argc, char **argv ){
/* light the world */
LightWorld();
/* ydnar: store off lightmaps */
StoreSurfaceLightmaps();
/* write out the bsp */
UnparseEntities();
Sys_Printf( "Writing %s\n", source );