1
0
Fork 0
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:
Loic Blot 2021-04-29 08:51:17 +02:00 committed by Loïc Blot
parent 258101a910
commit 1bc855646e
8 changed files with 56 additions and 52 deletions

View file

@ -53,9 +53,9 @@ static video::SMaterial baseMaterial()
return mat;
};
Sky::Sky(s32 id, ITextureSource *tsrc, IShaderSource *ssrc) :
scene::ISceneNode(RenderingEngine::get_scene_manager()->getRootSceneNode(),
RenderingEngine::get_scene_manager(), id)
Sky::Sky(s32 id, RenderingEngine *rendering_engine, ITextureSource *tsrc, IShaderSource *ssrc) :
scene::ISceneNode(rendering_engine->get_scene_manager()->getRootSceneNode(),
rendering_engine->get_scene_manager(), id)
{
m_seed = (u64)myrand() << 32 | myrand();