From cde1f3c0d50198402dceb1b7d4bc955358e98751 Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 20 May 2009 14:48:26 +0000 Subject: [PATCH] nolightmapsearch by LH git-svn-id: svn://svn.icculus.org/netradiant/trunk@366 61c419a2-8eb2-4b30-bcec-8cead039b335 --- tools/quake3/q3map2/light.c | 6 ++++++ tools/quake3/q3map2/lightmaps_ydnar.c | 2 +- tools/quake3/q3map2/q3map2.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/quake3/q3map2/light.c b/tools/quake3/q3map2/light.c index 9a50d825..eacfba31 100644 --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@ -2168,6 +2168,12 @@ int LightMain( int argc, char **argv ) noCollapse = qtrue; Sys_Printf( "Identical lightmap collapsing disabled\n" ); } + + else if( !strcmp( argv[ i ], "-nolightmapsearch" ) ) + { + noLightmapSearch = qtrue; + Sys_Printf( "No lightmap searching - all lightmaps will be sequential\n" ); + } else if( !strcmp( argv[ i ], "-shade" ) ) { diff --git a/tools/quake3/q3map2/lightmaps_ydnar.c b/tools/quake3/q3map2/lightmaps_ydnar.c index 8ea7aa39..35e81e54 100644 --- a/tools/quake3/q3map2/lightmaps_ydnar.c +++ b/tools/quake3/q3map2/lightmaps_ydnar.c @@ -2015,7 +2015,7 @@ static void FindOutLightmaps( rawLightmap_t *lm ) y = 0; /* walk the list of lightmap pages */ - for( i = 0; i < numOutLightmaps; i++ ) + for( i = noLightmapSearch ? numOutLightmaps - 2 : 0; i < numOutLightmaps; i++ ) { /* get the output lightmap */ olm = &outLightmaps[ i ]; diff --git a/tools/quake3/q3map2/q3map2.h b/tools/quake3/q3map2/q3map2.h index 590b817c..f5ab7619 100644 --- a/tools/quake3/q3map2/q3map2.h +++ b/tools/quake3/q3map2/q3map2.h @@ -2179,6 +2179,7 @@ Q_EXTERN qboolean dark Q_ASSIGN( qfalse ); Q_EXTERN qboolean sunOnly Q_ASSIGN( qfalse ); Q_EXTERN int approximateTolerance Q_ASSIGN( 0 ); Q_EXTERN qboolean noCollapse Q_ASSIGN( qfalse ); +Q_EXTERN qboolean noLightmapSearch Q_ASSIGN( qfalse ); Q_EXTERN qboolean exportLightmaps Q_ASSIGN( qfalse ); Q_EXTERN qboolean externalLightmaps Q_ASSIGN( qfalse ); Q_EXTERN int lmCustomSize Q_ASSIGN( LIGHTMAP_WIDTH ); -- 2.39.2