From 80faa85d364cf0e1a8925090f98034776537b35e Mon Sep 17 00:00:00 2001 From: Garux Date: Fri, 27 Oct 2017 18:18:11 +0300 Subject: [PATCH] q3map2: fix -samplessearchboxsize msg printing --- tools/quake3/q3map2/light.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tools/quake3/q3map2/light.c b/tools/quake3/q3map2/light.c index f3f20ff3..8694d8b8 100644 --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@ -2487,15 +2487,12 @@ int LightMain( int argc, char **argv ){ else if ( !strcmp( argv[ i ], "-samplessearchboxsize" ) ) { lightSamplesSearchBoxSize = atoi( argv[ i + 1 ] ); - if ( lightSamplesSearchBoxSize <= 0 ) { - lightSamplesSearchBoxSize = 1; - } - if ( lightSamplesSearchBoxSize > 4 ) { - lightSamplesSearchBoxSize = 4; /* more makes no sense */ - } - else if ( lightSamplesSearchBoxSize != 1 ) { +// lightSamplesSearchBoxSize = MAX( MIN( lightSamplesSearchBoxSize, 4 ), 1 ); + lightSamplesSearchBoxSize = lightSamplesSearchBoxSize < 1 ? 1 + : lightSamplesSearchBoxSize > 4 ? 4 /* more makes no sense */ + : lightSamplesSearchBoxSize; + if ( lightSamplesSearchBoxSize != 1 ) Sys_Printf( "Adaptive supersampling uses %f times the normal search box size\n", lightSamplesSearchBoxSize ); - } i++; }