]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
add option -nofastpoint; make old buggy behaviour default as it is typically a lot...
authorRudolf Polzer <divverent@xonotic.org>
Thu, 9 Feb 2012 10:28:49 +0000 (11:28 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 9 Feb 2012 10:28:49 +0000 (11:28 +0100)
tools/quake3/q3map2/light.c
tools/quake3/q3map2/light_ydnar.c
tools/quake3/q3map2/q3map2.h

index c5015e84566560d6fa6214f6e973fd4af5fc58d4..db1cc576c96d2e39e8b9baf789ebfabbd5038a34 100644 (file)
@@ -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" ) )
index 12742f707cc439df86a172e6476d18979990c7d8..d10c72648f3482b8245325f52a5f252d6acc61fc 100644 (file)
@@ -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);
                                
index 17b711b38216529aa9d42b4fc129d0678acedcb4..89dbe3c9b2ff58fd973ab3eeb094ff376a1baa33 100644 (file)
@@ -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 );