]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
[q3map2] allow to set arbitrary default light subdivision value 67/head
authorThomas Debesse <dev@illwieckz.net>
Thu, 27 Jul 2017 03:45:11 +0000 (05:45 +0200)
committerThomas Debesse <dev@illwieckz.net>
Thu, 27 Jul 2017 03:47:00 +0000 (05:47 +0200)
to be used without -fast

tools/quake3/q3map2/help.c
tools/quake3/q3map2/light.c

index 5cc81ab9f6abfe768f11499ba34ff51456f82694..9e8a590ca49a8597bc155232b6aad32d9173b7d8 100644 (file)
@@ -207,6 +207,7 @@ void HelpLight()
                {"-keeplights", "Keep light entities in the BSP file after compile"},
                {"-lightmapdir <directory>", "Directory to store external lightmaps (default: same as map name without extension)"},
                {"-lightmapsize <N>", "Size of lightmaps to generate (must be a power of two)"},
                {"-keeplights", "Keep light entities in the BSP file after compile"},
                {"-lightmapdir <directory>", "Directory to store external lightmaps (default: same as map name without extension)"},
                {"-lightmapsize <N>", "Size of lightmaps to generate (must be a power of two)"},
+               {"-lightsubdiv <N>", "Size of light emitting shader subdivision"},
                {"-lomem", "Low memory but slower lighting mode"},
                {"-lowquality", "Low quality floodlight (appears to currently break floodlight)"},
                {"-minsamplesize <N>", "Sets minimum lightmap resolution in luxels/qu"},
                {"-lomem", "Low memory but slower lighting mode"},
                {"-lowquality", "Low quality floodlight (appears to currently break floodlight)"},
                {"-minsamplesize <N>", "Sets minimum lightmap resolution in luxels/qu"},
index c340b9dc03753139f4e65f70dc4c9a94b9974534..102300d150e0e9e1eb0b02bbd6c142c6325c36c9 100644 (file)
@@ -2120,7 +2120,6 @@ int LightMain( int argc, char **argv ){
        qboolean lightSamplesInsist = qfalse;
        qboolean fastAllocate = qfalse;
 
        qboolean lightSamplesInsist = qfalse;
        qboolean fastAllocate = qfalse;
 
-
        /* note it */
        Sys_Printf( "--- Light ---\n" );
        Sys_Printf( "--- ProcessGameSpecific ---\n" );
        /* note it */
        Sys_Printf( "--- Light ---\n" );
        Sys_Printf( "--- ProcessGameSpecific ---\n" );
@@ -2778,6 +2777,14 @@ int LightMain( int argc, char **argv ){
                        loMem = qtrue;
                        Sys_Printf( "Enabling low-memory (potentially slower) lighting mode\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 );
                else if ( !strcmp( argv[ i ], "-lightanglehl" ) ) {
                        if ( ( atoi( argv[ i + 1 ] ) != 0 ) != lightAngleHL ) {
                                lightAngleHL = ( atoi( argv[ i + 1 ] ) != 0 );