mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-17 18:35:20 +02:00
Reuse object_shader for "wielditem" and "item" entity drawtypes (#9537)
This commit is contained in:
@@ -826,11 +826,12 @@ void GenericCAO::setNodeLight(u8 light)
|
||||
video::SColor color(255, light, light, light);
|
||||
|
||||
if (m_prop.visual == "wielditem" || m_prop.visual == "item") {
|
||||
// Since these types of visuals are using their own shader
|
||||
// they should be handled separately
|
||||
if (m_wield_meshnode)
|
||||
m_wield_meshnode->setColor(color);
|
||||
} else if (m_enable_shaders) {
|
||||
m_wield_meshnode->setNodeLightColor(color);
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_enable_shaders) {
|
||||
scene::ISceneNode *node = getSceneNode();
|
||||
|
||||
if (node == nullptr)
|
||||
|
Reference in New Issue
Block a user