From 374f66bb42a23d47582d9eca1ae631b8d1da3f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?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.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/quake3/q3map2/light.cpp b/tools/quake3/q3map2/light.cpp index 98ece513..6d8a4517 100644 --- a/tools/quake3/q3map2/light.cpp +++ b/tools/quake3/q3map2/light.cpp @@ -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 );