]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Merge branch 'subdiv' into 'master'
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 30 Jul 2017 05:38:34 +0000 (05:38 +0000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 30 Jul 2017 05:38:34 +0000 (05:38 +0000)
[q3map2] allow to set arbitrary default light subdivision value

See merge request !67

1  2 
tools/quake3/q3map2/light.c

index 0bbb5e7be21ac65aee3033978db5f22af081c599,102300d150e0e9e1eb0b02bbd6c142c6325c36c9..756b7731b2ef028acbb15b8ad5e2151689299028
@@@ -2120,7 -2120,6 +2120,6 @@@ int LightMain( int argc, char **argv )
        qboolean lightSamplesInsist = qfalse;
        qboolean fastAllocate = qfalse;
  
        /* note it */
        Sys_Printf( "--- Light ---\n" );
        Sys_Printf( "--- ProcessGameSpecific ---\n" );
                        loMem = qtrue;
                        Sys_Printf( "Enabling low-memory (potentially slower) lighting mode\n" );
                }
+               else if ( !strcmp( argv[ i ], "-lightsubdiv" ) ) {
+                       defaultLightSubdivide = atoi( argv[ i + 1 ] );
+                       if ( defaultLightSubdivide < 1 ) {
+                               defaultLightSubdivide = 1;
+                       }
+                       i++;
+                       Sys_Printf( "Default light subdivision set to %d\n", defaultLightSubdivide );
+               }
                else if ( !strcmp( argv[ i ], "-lightanglehl" ) ) {
                        if ( ( atoi( argv[ i + 1 ] ) != 0 ) != lightAngleHL ) {
                                lightAngleHL = ( atoi( argv[ i + 1 ] ) != 0 );
                                        Sys_Printf( "Disabling half lambert light angle attenuation\n" );
                                }
                        }
 +                      i++;
                }
                else if ( !strcmp( argv[ i ], "-nostyle" ) || !strcmp( argv[ i ], "-nostyles" ) ) {
                        noStyles = qtrue;