mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 08:03:45 +01:00
Use correct indexes when checking mesh normals
This commit is contained in:
parent
a684a91bf5
commit
e4583cb9b7
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user