From: Rudolf Polzer Date: Sat, 13 Nov 2010 07:10:27 +0000 (+0100) Subject: new args -meta and -patchmeta to -convert with .map file argument X-Git-Tag: xonotic-v0.5.0~154 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fa9d3a210a749905b107de7f67b9e90789c6b8f9;p=xonotic%2Fnetradiant.git new args -meta and -patchmeta to -convert with .map file argument --- diff --git a/tools/quake3/q3map2/main.c b/tools/quake3/q3map2/main.c index efef64e9..2deb1429 100644 --- a/tools/quake3/q3map2/main.c +++ b/tools/quake3/q3map2/main.c @@ -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();