mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
refacto: protect some RenderingEngine::get_scene_manager
* protect it from Camera, Sky, ClientMap object calls * rename Game::sky to Game::m_sky
This commit is contained in:
parent
258101a910
commit
1bc855646e
8 changed files with 56 additions and 52 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue