aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/content_cao.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/client/content_cao.cpp b/src/client/content_cao.cpp
index d89bb53b3..9c3e5aa05 100644
--- a/src/client/content_cao.cpp
+++ b/src/client/content_cao.cpp
@@ -905,12 +905,8 @@ void GenericCAO::setNodeLight(const video::SColor &light_color)
if (m_prop.visual == "upright_sprite") {
if (!m_meshnode)
return;
-
- scene::IMesh *mesh = m_meshnode->getMesh();
- for (u32 i = 0; i < mesh->getMeshBufferCount(); ++i) {
- scene::IMeshBuffer *buf = mesh->getMeshBuffer(i);
- buf->getMaterial().EmissiveColor = light_color;
- }
+ for (u32 i = 0; i < m_meshnode->getMaterialCount(); ++i)
+ m_meshnode->getMaterial(i).EmissiveColor = light_color;
} else {
scene::ISceneNode *node = getSceneNode();
if (!node)