aboutsummaryrefslogtreecommitdiff
path: root/src/client/content_cao.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/content_cao.cpp')
-rw-r--r--src/client/content_cao.cpp8
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);