]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
fix option checking for -grid* options
authorRudolf Polzer <divverent@alientrap.org>
Sat, 1 Jan 2011 19:15:20 +0000 (20:15 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 1 Jan 2011 19:15:20 +0000 (20:15 +0100)
tools/quake3/q3map2/light.c

index a703faacf53e8fff145e897ef42351055e3e62af..389da27a4996201ac1e059c4e360ba637cc3695a 100644 (file)
@@ -2184,8 +2184,8 @@ int LightMain( int argc, char **argv )
                else if( !strcmp( argv[ i ], "-griddirectionality" ) )
                {
                        f = atof( argv[ i + 1 ] );
-                       if(f < 0) f = 0;
-                       if(f > gridAmbientDirectionality) f = gridAmbientDirectionality;
+                       if(f < gridAmbientDirectionality) f = gridAmbientDirectionality;
+                       if(f > 1) f = 1;
                        Sys_Printf( "Grid directionality is %f\n", f );
                        gridDirectionality *= f;
                        i++;
@@ -2195,7 +2195,7 @@ int LightMain( int argc, char **argv )
                {
                        f = atof( argv[ i + 1 ] );
                        if(f > gridDirectionality) f = gridDirectionality;
-                       if(f > 1) f = 1;
+                       if(f < 0) f = 0;
                        Sys_Printf( "Grid ambient directionality is %f\n", f );
                        gridAmbientDirectionality *= f;
                        i++;