diff --git a/src/client/content_mapblock.cpp b/src/client/content_mapblock.cpp index 25d303156..49abbd4fa 100644 --- a/src/client/content_mapblock.cpp +++ b/src/client/content_mapblock.cpp @@ -1673,8 +1673,6 @@ void MapblockMeshGenerator::drawMeshNode() modified = false; if (modified) { recalculateBoundingBox(mesh); - // FIXME: we should rotate the normals too, instead of recalculating - meshmanip->recalculateNormals(mesh, true, false); } } else { warningstream << "drawMeshNode(): missing mesh" << std::endl; diff --git a/src/client/mesh.cpp b/src/client/mesh.cpp index 012b9a45a..eb56d3580 100644 --- a/src/client/mesh.cpp +++ b/src/client/mesh.cpp @@ -249,10 +249,14 @@ static void rotateMesh(scene::IMesh *mesh, float degrees) float c = std::cos(degrees); float s = std::sin(degrees); auto rotator = [c, s] (video::S3DVertex *vertex) { - float u = vertex->Pos.*U; - float v = vertex->Pos.*V; - vertex->Pos.*U = c * u - s * v; - vertex->Pos.*V = s * u + c * v; + auto rotate_vec = [c, s] (v3f &vec) { + float u = vec.*U; + float v = vec.*V; + vec.*U = c * u - s * v; + vec.*V = s * u + c * v; + }; + rotate_vec(vertex->Pos); + rotate_vec(vertex->Normal); }; applyToMesh(mesh, rotator); }