aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>2012-11-27 01:35:18 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-11-27 08:06:13 +0200
commit5f798d944ee03beca205b107dda58bdc72dd2bf8 (patch)
tree39815d000ec562bc6856bfc671492c0738d92eef
parent6b927229f5f9cb9a8163ecec482160975199fa0f (diff)
downloadminetest-5f798d944ee03beca205b107dda58bdc72dd2bf8.tar.gz
minetest-5f798d944ee03beca205b107dda58bdc72dd2bf8.tar.bz2
minetest-5f798d944ee03beca205b107dda58bdc72dd2bf8.zip
Fix forgotten material properties for meshes (also seems to have been forgotten for cubes previously). This allows transparent png images to work properly
-rw-r--r--src/content_cao.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/content_cao.cpp b/src/content_cao.cpp
index c7d21d278..8229ded62 100644
--- a/src/content_cao.cpp
+++ b/src/content_cao.cpp
@@ -923,6 +923,11 @@ public:
m_prop.visual_size.X));
u8 li = m_last_light;
setMeshColor(m_meshnode->getMesh(), video::SColor(255,li,li,li));
+
+ m_meshnode->setMaterialFlag(video::EMF_LIGHTING, false);
+ m_meshnode->setMaterialFlag(video::EMF_BILINEAR_FILTER, false);
+ m_meshnode->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF);
+ m_meshnode->setMaterialFlag(video::EMF_FOG_ENABLE, true);
}
else if(m_prop.visual == "mesh"){
infostream<<"GenericCAO::addToScene(): mesh"<<std::endl;
@@ -936,6 +941,11 @@ public:
m_prop.visual_size.X));
u8 li = m_last_light;
setMeshColor(m_animated_meshnode->getMesh(), video::SColor(255,li,li,li));
+
+ m_animated_meshnode->setMaterialFlag(video::EMF_LIGHTING, false);
+ m_animated_meshnode->setMaterialFlag(video::EMF_BILINEAR_FILTER, false);
+ m_animated_meshnode->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF);
+ m_animated_meshnode->setMaterialFlag(video::EMF_FOG_ENABLE, true);
}
else
errorstream<<"GenericCAO::addToScene(): Could not load mesh "<<m_prop.mesh<<std::endl;