]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/wieldmesh.cpp
Fix how address is logged when a wrong password is supplied
[dragonfireclient.git] / src / wieldmesh.cpp
index 56c84b9592ad77abeab824dfa4605eed5523bb1c..bc2977a0e2a0fe48c37e914bb9ded7af8e7c6a08 100644 (file)
@@ -37,7 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #define MIN_EXTRUSION_MESH_RESOLUTION 16
 #define MAX_EXTRUSION_MESH_RESOLUTION 512
 
-static scene::IMeshcreateExtrusionMesh(int resolution_x, int resolution_y)
+static scene::IMesh *createExtrusionMesh(int resolution_x, int resolution_y)
 {
        const f32 r = 0.5;
 
@@ -114,8 +114,9 @@ static scene::IMesh* createExtrusionMesh(int resolution_x, int resolution_y)
        mesh->addMeshBuffer(buf);
        buf->drop();
        scaleMesh(mesh, scale);  // also recalculates bounding box
-       mesh = (scene::SMesh *)createForsythOptimizedMesh(mesh);
-       return mesh;
+       scene::IMesh *newmesh = createForsythOptimizedMesh(mesh);
+       mesh->drop();
+       return newmesh;
 }
 
 /*
@@ -301,7 +302,7 @@ void WieldMeshSceneNode::setExtruded(const std::string &imagename,
        material.setFlag(video::EMF_USE_MIP_MAPS, false);
 #endif
        if (m_enable_shaders) {
-               material.setTexture(2, tsrc->getShaderFlagsTexture(false, true, true));
+               material.setTexture(2, tsrc->getShaderFlagsTexture(false));
        }
 }