From 313864812fa438225db6f32cc167459102c5a124 Mon Sep 17 00:00:00 2001 From: ousnius Date: Sat, 18 Apr 2020 15:11:55 +0200 Subject: [PATCH] Fixed vertex deletion in segments --- lib/NIF/Geometry.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/NIF/Geometry.cpp b/lib/NIF/Geometry.cpp index ef674361..6abb33b7 100644 --- a/lib/NIF/Geometry.cpp +++ b/lib/NIF/Geometry.cpp @@ -815,6 +815,8 @@ void BSTriShape::notifyVerticesDelete(const std::vector& vertIndices) { ApplyMapToTriangles(triangles, indexCollapse, &deletedTris); numTriangles = triangles.size(); + + std::sort(deletedTris.begin(), deletedTris.end(), std::greater<>()); } void BSTriShape::GetChildRefs(std::set& refs) {