mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Reuse object_shader for "wielditem" and "item" entity drawtypes (#9537)
This commit is contained in:
parent
c87d52a5fa
commit
cdbe3c5e57
6 changed files with 24 additions and 165 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue