diff --git a/tools/quake3/q3map2/surface.cpp b/tools/quake3/q3map2/surface.cpp index 57d7dc4e..34b08caa 100644 --- a/tools/quake3/q3map2/surface.cpp +++ b/tools/quake3/q3map2/surface.cpp @@ -483,7 +483,7 @@ void ClassifySurfaces( int numSurfs, mapDrawSurface_t *ds ){ { ds->planeNum = -1; ds->lightmapVecs[ 2 ].set( 0 ); - //% if( ds->type == SURF_META || ds->type == SURF_FACE ) + //% if( ds->type == ESurfaceType::Meta || ds->type == ESurfaceType::Face ) //% Sys_Warning( "Non-planar face (%d): %s\n", ds->planeNum, ds->shaderInfo->shader ); } @@ -703,7 +703,7 @@ static shaderInfo_t *GetIndexedShader( const shaderInfo_t *parent, const indexMa /* DrawSurfaceForSide() - creates a SURF_FACE drawsurface from a given brush side and winding + creates a ESurfaceType::Face drawsurface from a given brush side and winding stores references to given brush and side */ diff --git a/tools/quake3/q3map2/surface_meta.cpp b/tools/quake3/q3map2/surface_meta.cpp index 84cbfd2e..287e97be 100644 --- a/tools/quake3/q3map2/surface_meta.cpp +++ b/tools/quake3/q3map2/surface_meta.cpp @@ -1663,6 +1663,10 @@ static void MetaTrianglesToSurface( int *fOld, int *numAdded ){ /* classify the surface */ ClassifySurfaces( 1, ds ); //% Sys_Warning( "numV: %d numIdx: %d\n", ds->numVerts, ds->numIndexes ); + /* ClassifySurfaces() sets axis from vertex normals + method is very questionable and axis actually happens to be wrong after normals passed through SmoothMetaTriangles() + use metaTriangle_t::lightmapAxis which is guaranteedly set and used as main factor for triangles merge */ + ds->lightmapAxis = seed.lightmapAxis; /* add to count */ numMergedSurfaces++;