From 82acc9660942603b8f2eb0a70fc1e3aa2074b46f Mon Sep 17 00:00:00 2001 From: Victor Luchits Date: Tue, 28 Jun 2016 12:03:22 +0300 Subject: [PATCH] Fix default minimum/ambience color for sRGB lightmaps --- tools/quake3/q3map2/light.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/quake3/q3map2/light.c b/tools/quake3/q3map2/light.c index a408e35a..2571d4d2 100644 --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@ -1910,14 +1910,14 @@ void LightWorld( const char *BSPFilePath, qboolean fastAllocate ){ /* find the optional minimum lighting values */ GetVectorForKey( &entities[ 0 ], "_color", color ); + if ( VectorLength( color ) == 0.0f ) { + VectorSet( color, 1.0, 1.0, 1.0 ); + } if ( colorsRGB ) { color[0] = Image_LinearFloatFromsRGBFloat( color[0] ); color[1] = Image_LinearFloatFromsRGBFloat( color[1] ); color[2] = Image_LinearFloatFromsRGBFloat( color[2] ); } - if ( VectorLength( color ) == 0.0f ) { - VectorSet( color, 1.0, 1.0, 1.0 ); - } /* ambient */ f = FloatForKey( &entities[ 0 ], "_ambient" ); -- 2.39.2