Re-fix CAO mesh lighting with shaders disabled

previously: 65af606729f7e3c162bf0b77a02570697f784c66
This commit is contained in:
sfan5 2024-11-09 12:12:01 +01:00
parent 4bb9c8c61b
commit 122b2d70d9

@ -741,7 +741,8 @@ void GenericCAO::addToScene(ITextureSource *tsrc, scene::ISceneManager *smgr)
});
} else if (m_prop.visual == "mesh") {
grabMatrixNode();
scene::IAnimatedMesh *mesh = m_client->getMesh(m_prop.mesh, true);
// can't cache mesh if shaders disabled, since we modify vertices
scene::IAnimatedMesh *mesh = m_client->getMesh(m_prop.mesh, m_enable_shaders);
if (mesh) {
if (!checkMeshNormals(mesh)) {
infostream << "GenericCAO: recalculating normals for mesh "