|
@@ -462,11 +462,14 @@ public:
|
|
// Create new ClientCached
|
|
// Create new ClientCached
|
|
auto cc = std::make_unique<ClientCached>();
|
|
auto cc = std::make_unique<ClientCached>();
|
|
|
|
|
|
- // Create an inventory texture
|
|
|
|
cc->inventory_texture = NULL;
|
|
cc->inventory_texture = NULL;
|
|
if (!inventory_image.empty())
|
|
if (!inventory_image.empty())
|
|
cc->inventory_texture = tsrc->getTexture(inventory_image);
|
|
cc->inventory_texture = tsrc->getTexture(inventory_image);
|
|
getItemMesh(client, item, &(cc->wield_mesh));
|
|
getItemMesh(client, item, &(cc->wield_mesh));
|
|
|
|
+ // note: vertices are modified frequently (see hud.cpp) so only indices
|
|
|
|
+ // can be mapped
|
|
|
|
+ if (auto mesh = cc->wield_mesh.mesh)
|
|
|
|
+ mesh->setHardwareMappingHint(scene::EHM_STATIC, scene::EBT_INDEX);
|
|
|
|
|
|
cc->palette = tsrc->getPalette(def.palette_image);
|
|
cc->palette = tsrc->getPalette(def.palette_image);
|
|
|
|
|