From 72e497d809e1e68353efb8b2c259a2203951480b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matthias=20Kr=C3=BCger?= Date: Thu, 3 Sep 2015 02:29:27 +0200 Subject: [PATCH] q3map2: don't store lightmap if the last bounce computation ran empty. --- tools/quake3/q3map2/light.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 ); -- 2.39.2