]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
new args -meta and -patchmeta to -convert with .map file argument
authorRudolf Polzer <divverent@alientrap.org>
Sat, 13 Nov 2010 07:10:27 +0000 (08:10 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 13 Nov 2010 07:31:56 +0000 (08:31 +0100)
tools/quake3/q3map2/main.c

index efef64e96c42d7303b4cf7e1b2897e91aed34140..2deb142989b4c6c76becbe0fce027f6be8449ed2 100644 (file)
@@ -1472,6 +1472,9 @@ void PseudoCompileBSP(qboolean need_tree)
 
                entity->firstDrawSurf = numMapDrawSurfs;
 
+               ClearMetaTriangles();
+               PatchMapDrawSurfs(entity);
+
                if(mapEntityNum == 0 && need_tree)
                {
                        faces = MakeStructuralBSPFaceList(entities[0].brushes);
@@ -1504,7 +1507,16 @@ void PseudoCompileBSP(qboolean need_tree)
                        }
                }
 
+               if(meta)
+               {
+                       ClassifyEntitySurfaces(entity);
+                       MakeEntityDecals(entity);
+                       MakeEntityMetaTriangles(entity);
+                       SmoothMetaTriangles();
+                       MergeMetaTriangles();
+               }
                FilterDrawsurfsIntoTree(entity, tree);
+
                FilterStructuralBrushesIntoTree(entity, tree);
                FilterDetailBrushesIntoTree(entity, tree);
 
@@ -1587,6 +1599,13 @@ int ConvertBSPMain( int argc, char **argv )
                        shadersAsBitmap = qtrue;
                else if( !strcmp( argv[ i ],  "-forcereadbsp" ) )
                        force_bsp = qtrue;
+               else if( !strcmp( argv[ i ],  "-meta" ) )
+                       meta = qtrue;
+               else if( !strcmp( argv[ i ],  "-patchmeta" ) )
+               {
+                       meta = qtrue;
+                       patchMeta = qtrue;
+               }
        }
 
        LoadShaderInfo();