From 8b586748c46296140635757843aec0c636f9af86 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 1 Jan 2011 20:15:20 +0100 Subject: [PATCH] fix option checking for -grid* options --- tools/quake3/q3map2/light.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/quake3/q3map2/light.c b/tools/quake3/q3map2/light.c index a703faac..389da27a 100644 --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@ -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++; -- 2.39.2