aboutsummaryrefslogtreecommitdiff
path: root/src/client/renderingengine.h
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2021-04-29 09:40:56 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2021-05-03 19:49:19 +0200
commit5a02c376ea5f2e7f1dd0a2bd4f08bf953ed4bfc8 (patch)
treed4bd7334bad7f1bf0d01d1dc6acbaccd34132823 /src/client/renderingengine.h
parentccdd886e273ec2fa5f8cfe1d1f474914eccb2abf (diff)
downloadminetest-5a02c376ea5f2e7f1dd0a2bd4f08bf953ed4bfc8.tar.gz
minetest-5a02c376ea5f2e7f1dd0a2bd4f08bf953ed4bfc8.tar.bz2
minetest-5a02c376ea5f2e7f1dd0a2bd4f08bf953ed4bfc8.zip
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)
Diffstat (limited to 'src/client/renderingengine.h')
-rw-r--r--src/client/renderingengine.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/renderingengine.h b/src/client/renderingengine.h
index 5462aa667..4d06baa23 100644
--- a/src/client/renderingengine.h
+++ b/src/client/renderingengine.h
@@ -79,10 +79,9 @@ public:
return s_singleton->m_device->getVideoDriver();
}
- static scene::ISceneManager *get_scene_manager()
+ scene::ISceneManager *get_scene_manager()
{
- sanity_check(s_singleton && s_singleton->m_device);
- return s_singleton->m_device->getSceneManager();
+ return m_device->getSceneManager();
}
static irr::IrrlichtDevice *get_raw_device()