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/clientenvironment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client/clientenvironment.cpp') diff --git a/src/client/clientenvironment.cpp b/src/client/clientenvironment.cpp index 9c40484bf..7e3867537 100644 --- a/src/client/clientenvironment.cpp +++ b/src/client/clientenvironment.cpp @@ -352,7 +352,7 @@ u16 ClientEnvironment::addActiveObject(ClientActiveObject *object) if (!m_ao_manager.registerObject(object)) return 0; - object->addToScene(m_texturesource, RenderingEngine::get_scene_manager()); + object->addToScene(m_texturesource, m_client->getSceneManager()); // Update lighting immediately object->updateLight(getDayNightRatio()); -- cgit v1.2.3