From f5ff574e951a51fad6cc9a83777f98277ace2ed6 Mon Sep 17 00:00:00 2001
From: Amorilia <amorilia@users.sourceforge.net>
Date: Sat, 24 Sep 2011 09:24:12 +0100
Subject: [PATCH] Another small improvement in match algorithm.

---
 src/obj/NiTriShapeData.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/obj/NiTriShapeData.cpp b/src/obj/NiTriShapeData.cpp
index ec200bad..f903b801 100644
--- a/src/obj/NiTriShapeData.cpp
+++ b/src/obj/NiTriShapeData.cpp
@@ -218,6 +218,10 @@ void NiTriShapeData::DoMatchDetection() {
 
 		// Find all vertices that match this one.
 		for ( unsigned short j = i + 1; j < vertices.size(); ++j ) {
+			/* this index belongs to another group already */
+			/* so its vert/norm cannot match this group! */
+			if ( is_shared[j] )
+				continue;
 			/* for automatic regeneration we just consider
 			 * identical positions, though the format would
 			 * allow distinct positions to share a normal
-- 
GitLab