From: Rudolf Polzer Date: Sat, 30 Oct 2010 16:07:37 +0000 (+0200) Subject: add a floodlightDirectionScale value to the _floodlight key too (whatever it does) X-Git-Tag: xonotic-v0.5.0~161 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b7a62893a44911750be7faaf66bcfa6008738191;p=xonotic%2Fnetradiant.git add a floodlightDirectionScale value to the _floodlight key too (whatever it does) --- diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index 97c546d7..8d869dfb 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -4047,8 +4047,9 @@ void SetupFloodLight( void ) v1=v2=v3=0; v4=floodlightDistance; v5=floodlightIntensity; + v6=floodlightDirectionScale; - sscanf( value, "%lf %lf %lf %lf %lf", &v1, &v2, &v3, &v4, &v5); + sscanf( value, "%lf %lf %lf %lf %lf %lf", &v1, &v2, &v3, &v4, &v5); floodlightRGB[0]=v1; floodlightRGB[1]=v2; @@ -4061,9 +4062,11 @@ void SetupFloodLight( void ) if (v4<1) v4=1024; if (v5<1) v5=128; + if (v6<0) v6=1; floodlightDistance=v4; floodlightIntensity=v5; + floodlightDirectionScale=v6; floodlighty = qtrue; Sys_Printf( "FloodLighting enabled via worldspawn _floodlight key.\n" ); @@ -4342,7 +4345,7 @@ void FloodLightRawLightmap( int rawLightmapNum ) /* global pass */ if (floodlighty && floodlightIntensity) - FloodLightRawLightmapPass(lm, floodlightRGB, floodlightIntensity, floodlightDistance, floodlight_lowquality, 1.0f); + FloodLightRawLightmapPass(lm, floodlightRGB, floodlightIntensity, floodlightDistance, floodlight_lowquality, floodlightDirectionScale); /* custom pass */ if (lm->floodlightIntensity) diff --git a/tools/quake3/q3map2/q3map2.h b/tools/quake3/q3map2/q3map2.h index bf0d5c66..99a2469a 100644 --- a/tools/quake3/q3map2/q3map2.h +++ b/tools/quake3/q3map2/q3map2.h @@ -2229,6 +2229,7 @@ Q_EXTERN qboolean floodlight_lowquality Q_ASSIGN( qfalse ); Q_EXTERN vec3_t floodlightRGB; Q_EXTERN float floodlightIntensity Q_ASSIGN( 512.0f ); Q_EXTERN float floodlightDistance Q_ASSIGN( 1024.0f ); +Q_EXTERN float floodlightDirectionScale Q_ASSIGN( 1.0f ); Q_EXTERN qboolean dump Q_ASSIGN( qfalse ); Q_EXTERN qboolean debug Q_ASSIGN( qfalse );