mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Apply shadow texture to wield-based entities
For example, dropped nodes and items.
This commit is contained in:
parent
2bba53b2c3
commit
4e39cdef94
@ -541,9 +541,14 @@ void WieldMeshSceneNode::changeToMesh(scene::IMesh *mesh)
|
|||||||
m_meshnode->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, m_lighting);
|
m_meshnode->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, m_lighting);
|
||||||
m_meshnode->setVisible(true);
|
m_meshnode->setVisible(true);
|
||||||
|
|
||||||
|
if (m_shadow) {
|
||||||
// Add mesh to shadow caster
|
// Add mesh to shadow caster
|
||||||
if (m_shadow)
|
|
||||||
m_shadow->addNodeToShadowList(m_meshnode);
|
m_shadow->addNodeToShadowList(m_meshnode);
|
||||||
|
|
||||||
|
// Set shadow texture
|
||||||
|
for (u32 i = 0; i < m_meshnode->getMaterialCount(); i++)
|
||||||
|
m_meshnode->setMaterialTexture(3, m_shadow->get_texture());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void getItemMesh(Client *client, const ItemStack &item, ItemMesh *result)
|
void getItemMesh(Client *client, const ItemStack &item, ItemMesh *result)
|
||||||
|
Loading…
Reference in New Issue
Block a user