]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/wieldmesh.cpp
Biome API: Re-calculate biome at every surface in a mapchunk column
[dragonfireclient.git] / src / wieldmesh.cpp
index bde0b72afe9f0e69ac92850e59f31dbc79dd2633..7c16bddcbdb282af08ac465ab970c5f931013288 100644 (file)
@@ -340,7 +340,9 @@ void WieldMeshSceneNode::setItem(const ItemStack &item, IGameDef *gamedef)
                } else if (f.drawtype == NDT_NORMAL || f.drawtype == NDT_ALLFACES) {
                        setCube(f.tiles, def.wield_scale, tsrc);
                } else {
-                       MeshMakeData mesh_make_data(gamedef);
+                       //// TODO: Change false in the following constructor args to
+                       //// appropriate value when shader is added for wield items (if applicable)
+                       MeshMakeData mesh_make_data(gamedef, false);
                        MapNode mesh_make_node(id, 255, 0);
                        mesh_make_data.fillSingleNode(&mesh_make_node);
                        MapBlockMesh mapblock_mesh(&mesh_make_data, v3s16(0, 0, 0));
@@ -411,20 +413,20 @@ void WieldMeshSceneNode::changeToMesh(scene::IMesh *mesh)
                m_meshnode->setVisible(false);
                m_meshnode->setMesh(dummymesh);
                dummymesh->drop();  // m_meshnode grabbed it
-       }
-
-       if (m_lighting) {
-               m_meshnode->setMesh(mesh);
        } else {
-               /*
-                       Lighting is disabled, this means the caller can (and probably will)
-                       call setColor later. We therefore need to clone the mesh so that
-                       setColor will only modify this scene node's mesh, not others'.
-               */
-               scene::IMeshManipulator *meshmanip = SceneManager->getMeshManipulator();
-               scene::IMesh *new_mesh = meshmanip->createMeshCopy(mesh);
-               m_meshnode->setMesh(new_mesh);
-               new_mesh->drop();  // m_meshnode grabbed it
+               if (m_lighting) {
+                       m_meshnode->setMesh(mesh);
+               } else {
+                       /*
+                               Lighting is disabled, this means the caller can (and probably will)
+                               call setColor later. We therefore need to clone the mesh so that
+                               setColor will only modify this scene node's mesh, not others'.
+                       */
+                       scene::IMeshManipulator *meshmanip = SceneManager->getMeshManipulator();
+                       scene::IMesh *new_mesh = meshmanip->createMeshCopy(mesh);
+                       m_meshnode->setMesh(new_mesh);
+                       new_mesh->drop();  // m_meshnode grabbed it
+               }
        }
 
        m_meshnode->setMaterialFlag(video::EMF_LIGHTING, m_lighting);