From 1498ce667de972f251b22cdbbd83d1e0c215ae4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Mon, 13 Mar 2017 10:58:35 +0100 Subject: [PATCH] q3map2: don't store lightmap if the last bounce computation ran empty. --- tools/quake3/q3map2/light.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/quake3/q3map2/light.c b/tools/quake3/q3map2/light.c index 2af9ac49..03f17ed2 100644 --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@ -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 );