summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>2012-10-23 23:57:36 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-11-25 18:14:15 +0200
commitcb40b3517a2dfac96c6733ce6e89e13822998cf9 (patch)
tree12e5846e28f3a65f9726299ecad2a1678d166f7b
parent0a020dbcc848ae2debec664846e08bd097d70320 (diff)
downloadminetest-cb40b3517a2dfac96c6733ce6e89e13822998cf9.tar.gz
minetest-cb40b3517a2dfac96c6733ce6e89e13822998cf9.tar.bz2
minetest-cb40b3517a2dfac96c6733ce6e89e13822998cf9.zip
Fix material properties and allow lighting. Models should now be affected by light instead of being black
-rw-r--r--src/content_cao.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/content_cao.cpp b/src/content_cao.cpp
index 985f3cbbd..c0be4e4cd 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)