diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2021-04-29 08:51:17 +0200 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2021-05-03 19:49:19 +0200 |
commit | 1bc855646e2c920c1df55bb73416f72295c020f4 (patch) | |
tree | db872efec84c5daa6d37b6e2d1c71e4450255c3b /src/client/camera.cpp | |
parent | 258101a91031f3ff9ee01a974030b02529ffdac0 (diff) | |
download | hax-minetest-server-1bc855646e2c920c1df55bb73416f72295c020f4.tar.gz hax-minetest-server-1bc855646e2c920c1df55bb73416f72295c020f4.zip |
refacto: protect some RenderingEngine::get_scene_manager
* protect it from Camera, Sky, ClientMap object calls
* rename Game::sky to Game::m_sky
Diffstat (limited to '')
-rw-r--r-- | src/client/camera.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/camera.cpp b/src/client/camera.cpp index f6892295b..2629a6359 100644 --- a/src/client/camera.cpp +++ b/src/client/camera.cpp @@ -43,11 +43,11 @@ with this program; if not, write to the Free Software Foundation, Inc., #define WIELDMESH_AMPLITUDE_X 7.0f #define WIELDMESH_AMPLITUDE_Y 10.0f -Camera::Camera(MapDrawControl &draw_control, Client *client): +Camera::Camera(MapDrawControl &draw_control, Client *client, RenderingEngine *rendering_engine): m_draw_control(draw_control), m_client(client) { - scene::ISceneManager *smgr = RenderingEngine::get_scene_manager(); + auto smgr = rendering_engine->get_scene_manager(); // note: making the camera node a child of the player node // would lead to unexpected behaviour, so we don't do that. m_playernode = smgr->addEmptySceneNode(smgr->getRootSceneNode()); |