]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
fix issues with embedded models
authorRudolf Polzer <divverent@alientrap.org>
Fri, 8 Oct 2010 18:38:30 +0000 (20:38 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 8 Oct 2010 18:38:30 +0000 (20:38 +0200)
tools/quake3/q3map2/convert_map.c

index c175b58a87a442e795e4d891279c78a18b15030b..69418854eef79ffbea9017183e8faa1e66792d35 100644 (file)
@@ -87,7 +87,7 @@ void GetBestSurfaceTriangleMatchForBrushside(side_t *buildSide, bspDrawVert_t *b
                        vert[0] = &bspDrawVerts[s->firstVert + bspDrawIndexes[s->firstIndex + t + 0]];
                        vert[1] = &bspDrawVerts[s->firstVert + bspDrawIndexes[s->firstIndex + t + 1]];
                        vert[2] = &bspDrawVerts[s->firstVert + bspDrawIndexes[s->firstIndex + t + 2]];
-                       if(s->surfaceType == MST_PLANAR)
+                       if(s->surfaceType == MST_PLANAR && VectorCompare(vert[0]->normal, vert[1]->normal) && VectorCompare(vert[1]->normal, vert[2]->normal))
                        {
                                VectorSubtract(vert[0]->normal, buildPlane->normal, normdiff); if(VectorLength(normdiff) >= normalEpsilon) continue;
                                VectorSubtract(vert[1]->normal, buildPlane->normal, normdiff); if(VectorLength(normdiff) >= normalEpsilon) continue;