aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2019-10-06 13:45:31 +0200
committersfan5 <sfan5@live.de>2019-10-06 17:19:42 +0200
commit825579b43d6454cc33607ab8eff4e896b003b801 (patch)
treefa3ce7b3815c2e781e09622aeccc4a33d97ee1a4 /src/client
parentdee22104b7a9220e365f5d3aa95e2fd20cebfcf5 (diff)
downloadminetest-825579b43d6454cc33607ab8eff4e896b003b801.tar.gz
minetest-825579b43d6454cc33607ab8eff4e896b003b801.tar.bz2
minetest-825579b43d6454cc33607ab8eff4e896b003b801.zip
Fix upright_sprite lighting when colors are set
fixes #9020
Diffstat (limited to 'src/client')
-rw-r--r--src/client/content_cao.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/content_cao.cpp b/src/client/content_cao.cpp
index 934f4354e..a15c1cc0b 100644
--- a/src/client/content_cao.cpp
+++ b/src/client/content_cao.cpp
@@ -1264,18 +1264,19 @@ void GenericCAO::updateTextures(std::string mod)
buf->getMaterial().AmbientColor = m_prop.colors[1];
buf->getMaterial().DiffuseColor = m_prop.colors[1];
buf->getMaterial().SpecularColor = m_prop.colors[1];
- setMeshColor(mesh, m_prop.colors[1]);
} else if (!m_prop.colors.empty()) {
buf->getMaterial().AmbientColor = m_prop.colors[0];
buf->getMaterial().DiffuseColor = 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_BILINEAR_FILTER, use_bilinear_filter);
buf->getMaterial().setFlag(video::EMF_ANISOTROPIC_FILTER, use_anisotropic_filter);
}
+ // Set mesh color (only if lighting is disabled)
+ if (!m_prop.colors.empty() && m_glow < 0)
+ setMeshColor(mesh, m_prop.colors[0]);
}
}
}