Skip to content
Snippets Groups Projects
Commit 5f798d94 authored by MirceaKitsune's avatar MirceaKitsune Committed by Perttu Ahola
Browse files

Fix forgotten material properties for meshes (also seems to have been...

Fix forgotten material properties for meshes (also seems to have been forgotten for cubes previously). This allows transparent png images to work properly
parent 6b927229
No related branches found
No related tags found
No related merge requests found
......@@ -923,6 +923,11 @@ class GenericCAO : public ClientActiveObject
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 @@ class GenericCAO : public ClientActiveObject
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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment