summaryrefslogtreecommitdiff
path: root/src/client/wieldmesh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/wieldmesh.cpp')
-rw-r--r--src/client/wieldmesh.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/client/wieldmesh.cpp b/src/client/wieldmesh.cpp
index 2c6807fab..997eb1b5b 100644
--- a/src/client/wieldmesh.cpp
+++ b/src/client/wieldmesh.cpp
@@ -347,7 +347,7 @@ void WieldMeshSceneNode::setItem(const ItemStack &item, Client *client, bool che
scene::SMesh *mesh = nullptr;
if (m_enable_shaders) {
- u32 shader_id = shdrsrc->getShader("wielded_shader", TILE_MATERIAL_BASIC, NDT_NORMAL);
+ u32 shader_id = shdrsrc->getShader("object_shader", TILE_MATERIAL_BASIC, NDT_NORMAL);
m_material_type = shdrsrc->getShaderInfo(shader_id).material;
}
@@ -471,6 +471,21 @@ void WieldMeshSceneNode::setColor(video::SColor c)
}
}
+void WieldMeshSceneNode::setNodeLightColor(video::SColor color)
+{
+ if (!m_meshnode)
+ return;
+
+ if (m_enable_shaders) {
+ for (u32 i = 0; i < m_meshnode->getMaterialCount(); ++i) {
+ video::SMaterial &material = m_meshnode->getMaterial(i);
+ material.EmissiveColor = color;
+ }
+ } else {
+ setColor(color);
+ }
+}
+
void WieldMeshSceneNode::render()
{
// note: if this method is changed to actually do something,