]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
also -deluxemapsastexcoord
authorRudolf Polzer <divverent@alientrap.org>
Sat, 25 Dec 2010 23:18:13 +0000 (00:18 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 25 Dec 2010 23:18:13 +0000 (00:18 +0100)
tools/quake3/q3map2/convert_ase.c
tools/quake3/q3map2/convert_obj.c
tools/quake3/q3map2/main.c

index d0d07719e29e89d017ee65cf06d37da1fa9548c8..56262311b77bcd124ffeea19d836ce742a38b77d 100644 (file)
@@ -165,10 +165,10 @@ static void ConvertSurface( FILE *f, bspModel_t *model, int modelNum, bspDrawSur
        fprintf( f, "\t*PROP_RECVSHADOW\t1\r\n" );
        if(lightmapsAsTexcoord)
        {
-               if(ds->lightmapNum[0] >= 0 && ds->lightmapNum[0] < numLightmapsASE)
-                       fprintf( f, "\t*MATERIAL_REF\t%d\r\n", ds->lightmapNum[0] );
+               if(ds->lightmapNum[0] >= 0 && ds->lightmapNum[0] + deluxemap < numLightmapsASE)
+                       fprintf( f, "\t*MATERIAL_REF\t%d\r\n", ds->lightmapNum[0] + deluxemap );
                else
-                       Sys_Printf( "WARNING: lightmap %d out of range, not exporting\n", ds->lightmapNum[0] );
+                       Sys_Printf( "WARNING: lightmap %d out of range, not exporting\n", ds->lightmapNum[0] + deluxemap );
        }
        else
                fprintf( f, "\t*MATERIAL_REF\t%d\r\n", ds->shaderNum );
index f02da25a73d2fe84cf6a7a62be4e81b7b9d2371f..84e5678a696285183cb98c3c4d352744a103e0a8 100644 (file)
@@ -74,18 +74,18 @@ static void ConvertSurfaceToOBJ( FILE *f, bspModel_t *model, int modelNum, bspDr
        {
                if(objLastShaderNum != ds->lightmapNum[0])
                {
-                       fprintf(f, "usemtl lm_%04d\r\n", ds->lightmapNum[0]);
-                       objLastShaderNum = ds->lightmapNum[0];
+                       fprintf(f, "usemtl lm_%04d\r\n", ds->lightmapNum[0] + deluxemap);
+                       objLastShaderNum = ds->lightmapNum[0] + deluxemap;
                }
-               if(ds->lightmapNum[0] < firstLightmap)
+               if(ds->lightmapNum[0] + deluxemap < firstLightmap)
                {
-                       Sys_Printf( "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] );
-                       firstLightmap = ds->lightmapNum[0];
+                       Sys_Printf( "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] + deluxemap );
+                       firstLightmap = ds->lightmapNum[0] + deluxemap;
                }
                if(ds->lightmapNum[0] > lastLightmap)
                {
-                       Sys_Printf( "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] );
-                       lastLightmap = ds->lightmapNum[0];
+                       Sys_Printf( "WARNING: lightmap %d out of range (exporting anyway)\n", ds->lightmapNum[0] + deluxemap );
+                       lastLightmap = ds->lightmapNum[0] + deluxemap;
                }
        }
        else
index 325235fa57a0e66cdf8c432a970a1a35b2fabd67..ce631332bc9fc8b3bf7ad47c6d583e540ba80a51 100644 (file)
@@ -1604,6 +1604,11 @@ int ConvertBSPMain( int argc, char **argv )
                        shadersAsBitmap = qtrue;
                else if( !strcmp( argv[ i ],  "-lightmapsastexcoord" ) )
                        lightmapsAsTexcoord = qtrue;
+               else if( !strcmp( argv[ i ],  "-deluxemapsastexcoord" ) )
+               {
+                       lightmapsAsTexcoord = qtrue;
+                       deluxemap = qtrue;
+               }
                else if( !strcmp( argv[ i ],  "-forcereadbsp" ) )
                        force_bsp = qtrue;
                else if( !strcmp( argv[ i ],  "-meta" ) )