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 );
{
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
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" ) )