]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
add a floodlightDirectionScale value to the _floodlight key too (whatever it does)
authorRudolf Polzer <divverent@alientrap.org>
Sat, 30 Oct 2010 16:07:37 +0000 (18:07 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 30 Oct 2010 16:07:37 +0000 (18:07 +0200)
tools/quake3/q3map2/light_ydnar.c
tools/quake3/q3map2/q3map2.h

index 97c546d7379ab2cd5c92c9456095fa089d87831d..8d869dfb616826277b822e600df2598cef3ce6a8 100644 (file)
@@ -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)
index bf0d5c663b60817a98789aeabaf78f9497597e92..99a2469a04de6fb03767f3bfac78e47955afe4e4 100644 (file)
@@ -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 );