forked from Mirrorlandia_minetest/minetest
- Clear colors when reading property info.
- Set vertex colors on upright_sprites.
This commit is contained in:
parent
8037eda42c
commit
787cd15c14
@ -1134,10 +1134,12 @@ void GenericCAO::updateTextures(std::string mod)
|
|||||||
buf->getMaterial().AmbientColor = m_prop.colors[1];
|
buf->getMaterial().AmbientColor = m_prop.colors[1];
|
||||||
buf->getMaterial().DiffuseColor = m_prop.colors[1];
|
buf->getMaterial().DiffuseColor = m_prop.colors[1];
|
||||||
buf->getMaterial().SpecularColor = m_prop.colors[1];
|
buf->getMaterial().SpecularColor = m_prop.colors[1];
|
||||||
|
setMeshColor(mesh, m_prop.colors[1]);
|
||||||
} else if (!m_prop.colors.empty()) {
|
} else if (!m_prop.colors.empty()) {
|
||||||
buf->getMaterial().AmbientColor = m_prop.colors[0];
|
buf->getMaterial().AmbientColor = m_prop.colors[0];
|
||||||
buf->getMaterial().DiffuseColor = m_prop.colors[0];
|
buf->getMaterial().DiffuseColor = m_prop.colors[0];
|
||||||
buf->getMaterial().SpecularColor = m_prop.colors[0];
|
buf->getMaterial().SpecularColor = m_prop.colors[0];
|
||||||
|
setMeshColor(mesh, m_prop.colors[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
buf->getMaterial().setFlag(video::EMF_TRILINEAR_FILTER, use_trilinear_filter);
|
buf->getMaterial().setFlag(video::EMF_TRILINEAR_FILTER, use_trilinear_filter);
|
||||||
|
@ -145,6 +145,7 @@ void ObjectProperties::deSerialize(std::istream &is)
|
|||||||
makes_footstep_sound = readU8(is);
|
makes_footstep_sound = readU8(is);
|
||||||
automatic_rotate = readF1000(is);
|
automatic_rotate = readF1000(is);
|
||||||
mesh = deSerializeString(is);
|
mesh = deSerializeString(is);
|
||||||
|
colors.clear();
|
||||||
u32 color_count = readU16(is);
|
u32 color_count = readU16(is);
|
||||||
for (u32 i = 0; i < color_count; i++){
|
for (u32 i = 0; i < color_count; i++){
|
||||||
colors.push_back(readARGB8(is));
|
colors.push_back(readARGB8(is));
|
||||||
|
Loading…
Reference in New Issue
Block a user