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

@ -64,12 +64,13 @@ void MeshBufListList::add(scene::IMeshBuffer *buf, v3s16 position, u8 layer)
ClientMap::ClientMap(
Client *client,
RenderingEngine *rendering_engine,
MapDrawControl &control,
s32 id
):
Map(client),
scene::ISceneNode(RenderingEngine::get_scene_manager()->getRootSceneNode(),
RenderingEngine::get_scene_manager(), id),
scene::ISceneNode(rendering_engine->get_scene_manager()->getRootSceneNode(),
rendering_engine->get_scene_manager(), id),
m_client(client),
m_control(control)
{
@ -317,7 +318,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
v3f block_pos_r = intToFloat(block->getPosRelative() + MAP_BLOCKSIZE / 2, BS);
float d = camera_position.getDistanceFrom(block_pos_r);
d = MYMAX(0,d - BLOCK_MAX_RADIUS);
// Mesh animation
if (pass == scene::ESNRP_SOLID) {
//MutexAutoLock lock(block->mesh_mutex);