From e4583cb9b74119030e390871c216d0a49a41a222 Mon Sep 17 00:00:00 2001 From: Dmitry Kostenko Date: Sat, 1 Jan 2022 02:06:48 +0100 Subject: Use correct indexes when checking mesh normals --- src/client/mesh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/mesh.cpp b/src/client/mesh.cpp index 070200889..9bbb3a0a8 100644 --- a/src/client/mesh.cpp +++ b/src/client/mesh.cpp @@ -356,7 +356,7 @@ bool checkMeshNormals(scene::IMesh *mesh) buffer->getPosition(buffer->getIndices()[i+2])); for (u16 j = 0; j < 3; j++) - if (plane.Normal.dotProduct(buffer->getNormal(buffer->getIndices()[j])) < 0) + if (plane.Normal.dotProduct(buffer->getNormal(buffer->getIndices()[i+j])) <= 0) return false; } -- cgit v1.2.3