From: Rudolf Polzer Date: Thu, 9 Feb 2012 10:28:49 +0000 (+0100) Subject: add option -nofastpoint; make old buggy behaviour default as it is typically a lot... X-Git-Tag: xonotic-v0.6.0~16 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d5d6e981910d68cc6604e15833a431ebf3fe7aac;p=xonotic%2Fnetradiant.git add option -nofastpoint; make old buggy behaviour default as it is typically a lot faster. To not use fast point lights, pass -nofastpoint but not -fast. --- diff --git a/tools/quake3/q3map2/light.c b/tools/quake3/q3map2/light.c index c5015e84..db1cc576 100644 --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@ -2567,12 +2567,18 @@ int LightMain( int argc, char **argv ) Sys_Printf( "The -smooth argument is deprecated, use \"-samples 2\" instead\n" ); } + else if( !strcmp( argv[ i ], "-nofastpoint" ) ) + { + fastpoint = qfalse; + Sys_Printf( "Automatic fast mode for point lights disabled\n" ); + } + else if( !strcmp( argv[ i ], "-fast" ) ) { fast = qtrue; fastgrid = qtrue; fastbounce = qtrue; - Sys_Printf( "Fast mode enabled\n" ); + Sys_Printf( "Fast mode enabled for all area lights\n" ); } else if( !strcmp( argv[ i ], "-faster" ) ) diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index 12742f70..d10c7264 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -3623,6 +3623,8 @@ void SetupEnvelopes( qboolean forGrid, qboolean fastFlag ) light->flags |= LIGHT_FAST_TEMP; else light->flags &= ~LIGHT_FAST_TEMP; + if( fastpoint && (light->flags != EMIT_AREA) ) + light->flags |= LIGHT_FAST_TEMP; if( light->si && light->si->noFast ) light->flags &= ~(LIGHT_FAST | LIGHT_FAST_TEMP); diff --git a/tools/quake3/q3map2/q3map2.h b/tools/quake3/q3map2/q3map2.h index 17b711b3..89dbe3c9 100644 --- a/tools/quake3/q3map2/q3map2.h +++ b/tools/quake3/q3map2/q3map2.h @@ -2226,6 +2226,7 @@ Q_EXTERN qboolean debugDeluxemap Q_ASSIGN( qfalse ); Q_EXTERN int deluxemode Q_ASSIGN( 0 ); /* deluxemap format (0 - modelspace, 1 - tangentspace with renormalization, 2 - tangentspace without renormalization) */ Q_EXTERN qboolean fast Q_ASSIGN( qfalse ); +Q_EXTERN qboolean fastpoint Q_ASSIGN( qtrue ); Q_EXTERN qboolean faster Q_ASSIGN( qfalse ); Q_EXTERN qboolean fastgrid Q_ASSIGN( qfalse ); Q_EXTERN qboolean fastbounce Q_ASSIGN( qfalse );