1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

On-demand item meshes and textures

This commit is contained in:
Perttu Ahola 2012-11-30 18:12:32 +02:00
parent ba73e75ef9
commit bee170570d
8 changed files with 309 additions and 201 deletions

View file

@ -472,7 +472,7 @@ void ItemCAO::updateTexture()
IItemDefManager *idef = m_gamedef->idef();
ItemStack item;
item.deSerialize(is, idef);
texture = item.getDefinition(idef).inventory_texture;
texture = idef->getInventoryTexture(item.getDefinition(idef).name, m_gamedef);
}
catch(SerializationError &e)
{
@ -957,7 +957,7 @@ public:
infostream<<"textures[0]: "<<m_prop.textures[0]<<std::endl;
IItemDefManager *idef = m_gamedef->idef();
ItemStack item(m_prop.textures[0], 1, 0, "", idef);
scene::IMesh *item_mesh = item.getDefinition(idef).wield_mesh;
scene::IMesh *item_mesh = idef->getWieldMesh(item.getDefinition(idef).name, m_gamedef);
// Copy mesh to be able to set unique vertex colors
scene::IMeshManipulator *manip =