diff options
author | Danila Shutov <dcbrwn2@gmail.com> | 2020-06-07 19:14:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-07 18:14:00 +0200 |
commit | fe1f72ab0ac8bcc233c91eb5b2d71bd2d2574cf8 (patch) | |
tree | 4be77389e38c97dd1391439f212db642b16fac0b /src/client/content_cao.cpp | |
parent | 8fc9e7eb117849202b87bf3d764cd3eac6f68c74 (diff) | |
download | hax-minetest-server-fe1f72ab0ac8bcc233c91eb5b2d71bd2d2574cf8.tar.gz hax-minetest-server-fe1f72ab0ac8bcc233c91eb5b2d71bd2d2574cf8.zip |
Recalculate mesh normals for CAOs (#10000)
Diffstat (limited to '')
-rw-r--r-- | src/client/content_cao.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/content_cao.cpp b/src/client/content_cao.cpp index 855729642..a6ce06d20 100644 --- a/src/client/content_cao.cpp +++ b/src/client/content_cao.cpp @@ -726,6 +726,14 @@ void GenericCAO::addToScene(ITextureSource *tsrc) addAnimatedMeshSceneNode(mesh, m_matrixnode); m_animated_meshnode->grab(); mesh->drop(); // The scene node took hold of it + + if (!checkMeshNormals(mesh)) { + infostream << "GenericCAO: recalculating normals for mesh " + << m_prop.mesh << std::endl; + m_smgr->getMeshManipulator()-> + recalculateNormals(mesh, true, false); + } + m_animated_meshnode->animateJoints(); // Needed for some animations m_animated_meshnode->setScale(m_prop.visual_size); |