From: Victor Luchits Date: Tue, 28 Jun 2016 09:03:22 +0000 (+0300) Subject: Fix default minimum/ambience color for sRGB lightmaps X-Git-Tag: xonotic-v0.8.2~5^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F27%2Fhead;p=xonotic%2Fnetradiant.git Fix default minimum/ambience color for sRGB lightmaps --- 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" );