aboutsummaryrefslogtreecommitdiff
path: root/src/client/clientmap.cpp
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2021-04-29 08:51:17 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2021-05-03 19:49:19 +0200
commit1bc855646e2c920c1df55bb73416f72295c020f4 (patch)
treedb872efec84c5daa6d37b6e2d1c71e4450255c3b /src/client/clientmap.cpp
parent258101a91031f3ff9ee01a974030b02529ffdac0 (diff)
downloadminetest-1bc855646e2c920c1df55bb73416f72295c020f4.tar.gz
minetest-1bc855646e2c920c1df55bb73416f72295c020f4.tar.bz2
minetest-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 'src/client/clientmap.cpp')
-rw-r--r--src/client/clientmap.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/clientmap.cpp b/src/client/clientmap.cpp
index c5b47532c..6dc535898 100644
--- a/src/client/clientmap.cpp
+++ b/src/client/clientmap.cpp
@@ -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);