aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kostenko <codeforsmile@gmail.com>2022-01-01 02:06:48 +0100
committerx2048 <codeforsmile@gmail.com>2022-03-07 23:45:26 +0100
commite4583cb9b74119030e390871c216d0a49a41a222 (patch)
tree1fc206cb7aa3ff78e1c79e998a50c69f30cf13d3
parenta684a91bf5ef01dfeb05de517f3550b26ff45995 (diff)
downloadminetest-e4583cb9b74119030e390871c216d0a49a41a222.tar.gz
minetest-e4583cb9b74119030e390871c216d0a49a41a222.tar.bz2
minetest-e4583cb9b74119030e390871c216d0a49a41a222.zip
Use correct indexes when checking mesh normals
-rw-r--r--src/client/mesh.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}