From: MirceaKitsune Date: Tue, 23 Oct 2012 20:57:36 +0000 (+0300) Subject: Fix material properties and allow lighting. Models should now be affected by light... X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=cb40b3517a2dfac96c6733ce6e89e13822998cf9;p=zefram%2Fminetest%2Fminetest_engine.git Fix material properties and allow lighting. Models should now be affected by light instead of being black --- diff --git a/src/content_cao.cpp b/src/content_cao.cpp index 985f3cbb..c0be4e4c 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -1065,6 +1065,11 @@ public: m_prop.texture = "unknown_block.png"; video::IVideoDriver* driver = m_animated_meshnode->getSceneManager()->getVideoDriver(); m_animated_meshnode->setMaterialTexture(0, driver->getTexture(m_prop.texture.c_str())); + + // Set material flags and texture + video::SMaterial& material = m_animated_meshnode->getMaterial(0); + material.setFlag(video::EMF_LIGHTING, false); + material.setFlag(video::EMF_BILINEAR_FILTER, false); } } if(m_meshnode)