From b3d957127cbe75c64f518711cbf5125c84c5de41 Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Sun, 2 Jun 2024 16:38:42 +0200 Subject: [PATCH] Remove always false use_shaders param --- src/client/wieldmesh.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/client/wieldmesh.cpp b/src/client/wieldmesh.cpp index 40b63cb57..c7e4f7500 100644 --- a/src/client/wieldmesh.cpp +++ b/src/client/wieldmesh.cpp @@ -49,7 +49,7 @@ with this program; if not, write to the Free Software Foundation, Inc., * \param colors returns the colors of the mesh buffers in the mesh. */ static void postProcessNodeMesh(scene::SMesh *mesh, const ContentFeatures &f, - bool use_shaders, std::vector *colors, bool apply_scale) + std::vector *colors, bool apply_scale) { const u32 mc = mesh->getMeshBufferCount(); // Allocate colors for existing buffers @@ -81,16 +81,6 @@ static void postProcessNodeMesh(scene::SMesh *mesh, const ContentFeatures &f, } else { material.setTexture(0, layer->texture); } - if (use_shaders) { - if (layer->normal_texture) { - if (layer->animation_frame_count > 1) { - const FrameSpec &animation_frame = (*layer->frames)[0]; - material.setTexture(1, animation_frame.normal_texture); - } else - material.setTexture(1, layer->normal_texture); - } - material.setTexture(2, layer->flags_texture); - } if (apply_scale && tile->world_aligned) { u32 n = buf->getVertexCount(); @@ -353,7 +343,7 @@ void WieldMeshSceneNode::setCube(const ContentFeatures &f, scene::IMesh *cubemesh = g_extrusion_mesh_cache->createCube(); scene::SMesh *copy = cloneMesh(cubemesh); cubemesh->drop(); - postProcessNodeMesh(copy, f, false, &m_colors, true); + postProcessNodeMesh(copy, f, &m_colors, true); // Customize materials for (u32 i = 0; i < cubemesh->getMeshBufferCount(); ++i) { @@ -744,7 +734,7 @@ void getItemMesh(Client *client, const ItemStack &item, ItemMesh *result) } else scaleMesh(mesh, v3f(1.2, 1.2, 1.2)); // add overlays - postProcessNodeMesh(mesh, f, false, &result->buffer_colors, true); + postProcessNodeMesh(mesh, f, &result->buffer_colors, true); if (f.drawtype == NDT_ALLFACES) scaleMesh(mesh, v3f(f.visual_scale)); break;