From 5a02c376ea5f2e7f1dd0a2bd4f08bf953ed4bfc8 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Thu, 29 Apr 2021 09:40:56 +0200 Subject: refacto: RenderingEngine::get_scene_manager() is now not callable from singleton This permits to make evidence that we have some bad object passing on various code parts. I fixed majority of them to reduce the scope of passed objects Unfortunately, for some edge cases i should have to expose ISceneManager from client, this should be fixed in the future when our POO will be cleaner client side (we have a mix of rendering and processing in majority of the client objects, it works but it's not clean) --- src/client/wieldmesh.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/client/wieldmesh.cpp') diff --git a/src/client/wieldmesh.cpp b/src/client/wieldmesh.cpp index d9d5e57cd..08fd49fc0 100644 --- a/src/client/wieldmesh.cpp +++ b/src/client/wieldmesh.cpp @@ -307,7 +307,8 @@ static scene::SMesh *createSpecialNodeMesh(Client *client, MapNode n, MeshMakeData mesh_make_data(client, false); MeshCollector collector; mesh_make_data.setSmoothLighting(false); - MapblockMeshGenerator gen(&mesh_make_data, &collector); + MapblockMeshGenerator gen(&mesh_make_data, &collector, + client->getSceneManager()->getMeshManipulator()); if (n.getParam2()) { // keep it @@ -538,7 +539,7 @@ void getItemMesh(Client *client, const ItemStack &item, ItemMesh *result) content_t id = ndef->getId(def.name); FATAL_ERROR_IF(!g_extrusion_mesh_cache, "Extrusion mesh cache is not yet initialized"); - + scene::SMesh *mesh = nullptr; // Shading is on by default -- cgit v1.2.3