From bb15de2ddc9f86be499210b28bc2525770c3dcaa Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 14 Dec 2011 09:39:44 +0100 Subject: [PATCH] also support -sRGBcolor for floodlight --- tools/quake3/q3map2/light_ydnar.c | 12 ++++++++---- tools/quake3/q3map2/shaders.c | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index ed69504d..80796dcd 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -4075,7 +4075,7 @@ void SetupFloodLight( void ) if (VectorLength(floodlightRGB)==0) { - VectorSet(floodlightRGB,240,240,255); + VectorSet(floodlightRGB,0.94,0.94,1.0); } if (v4<1) v4=1024; @@ -4091,9 +4091,13 @@ void SetupFloodLight( void ) } else { - VectorSet(floodlightRGB,240,240,255); - //floodlighty = qtrue; - //Sys_Printf( "FloodLighting enabled via worldspawn _floodlight key.\n" ); + VectorSet(floodlightRGB,0.94,0.94,1.0); + } + if(colorsRGB) + { + floodlightRGB[0] = Image_LinearFloatFromsRGBFloat(floodlightRGB[0]); + floodlightRGB[1] = Image_LinearFloatFromsRGBFloat(floodlightRGB[1]); + floodlightRGB[2] = Image_LinearFloatFromsRGBFloat(floodlightRGB[2]); } VectorNormalize(floodlightRGB,floodlightRGB); } diff --git a/tools/quake3/q3map2/shaders.c b/tools/quake3/q3map2/shaders.c index ebe91fd8..e8eb43a6 100644 --- a/tools/quake3/q3map2/shaders.c +++ b/tools/quake3/q3map2/shaders.c @@ -1546,7 +1546,7 @@ static void ParseShaderFile( const char *filename ) si->floodlightRGB[1] = Image_LinearFloatFromsRGBFloat(si->floodlightRGB[1]); si->floodlightRGB[2] = Image_LinearFloatFromsRGBFloat(si->floodlightRGB[2]); } - VectorNormalize(si->floodlightRGB); + VectorNormalize(si->floodlightRGB, si->floodlightRGB); } /* jal: q3map_nodirty : skip dirty */ -- 2.39.2