From: Thomas Debesse Date: Thu, 27 Jul 2017 03:45:11 +0000 (+0200) Subject: [q3map2] allow to set arbitrary default light subdivision value X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=c7f847f583be9934f2b7b2a18e84bfaaf60eeda6;p=xonotic%2Fnetradiant.git [q3map2] allow to set arbitrary default light subdivision value to be used without -fast --- diff --git a/tools/quake3/q3map2/help.c b/tools/quake3/q3map2/help.c index 5cc81ab9..9e8a590c 100644 --- a/tools/quake3/q3map2/help.c +++ b/tools/quake3/q3map2/help.c @@ -207,6 +207,7 @@ void HelpLight() {"-keeplights", "Keep light entities in the BSP file after compile"}, {"-lightmapdir ", "Directory to store external lightmaps (default: same as map name without extension)"}, {"-lightmapsize ", "Size of lightmaps to generate (must be a power of two)"}, + {"-lightsubdiv ", "Size of light emitting shader subdivision"}, {"-lomem", "Low memory but slower lighting mode"}, {"-lowquality", "Low quality floodlight (appears to currently break floodlight)"}, {"-minsamplesize ", "Sets minimum lightmap resolution in luxels/qu"}, diff --git a/tools/quake3/q3map2/light.c b/tools/quake3/q3map2/light.c index c340b9dc..102300d1 100644 --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@ -2120,7 +2120,6 @@ int LightMain( int argc, char **argv ){ qboolean lightSamplesInsist = qfalse; qboolean fastAllocate = qfalse; - /* 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" ); } + 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 );