Fix material properties and allow lighting. Models should now be affected by light...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 23 Oct 2012 20:57:36 +0000 (23:57 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 25 Nov 2012 16:14:15 +0000 (18:14 +0200)
src/content_cao.cpp

index 985f3cbbde0d34d75f0c8385d2b963c373070245..c0be4e4cd067c069e17f8c03031303870b504416 100644 (file)
@@ -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)