diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-05-19 07:25:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-19 07:25:27 +0200 |
commit | e25a38e3fbb156ae2bc72cc66aef014ae3963407 (patch) | |
tree | f7f4f7e6e823650a60f4607e07d12d6705292eef /src/client.cpp | |
parent | 1c6d2f596df8fc2254916cf323bdbaf13905aebf (diff) | |
download | minetest-e25a38e3fbb156ae2bc72cc66aef014ae3963407.tar.gz minetest-e25a38e3fbb156ae2bc72cc66aef014ae3963407.tar.bz2 minetest-e25a38e3fbb156ae2bc72cc66aef014ae3963407.zip |
When minimap is disabled in configuration, really disable it (#5771)
* When minimap is disabled in configuration, really disable it
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp index 1e17e7c11..6ab4002a5 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -93,6 +93,7 @@ Client::Client( m_address_name(address_name), m_device(device), m_camera(NULL), + m_minimap(NULL), m_minimap_disabled_by_server(false), m_server_ser_ver(SER_FMT_VER_INVALID), m_proto_ver(0), @@ -127,7 +128,9 @@ Client::Client( // Add local player m_env.setLocalPlayer(new LocalPlayer(this, playername)); - m_minimap = new Minimap(device, this); + if (g_settings->getBool("enable_minimap")) { + m_minimap = new Minimap(device, this); + } m_cache_save_interval = g_settings->getU16("server_map_save_interval"); m_modding_enabled = g_settings->getBool("enable_client_modding"); @@ -502,7 +505,7 @@ void Client::step(float dtime) delete r.mesh; } - if (do_mapper_update) + if (m_minimap && do_mapper_update) m_minimap->addBlock(r.p, minimap_mapblock); if (r.ack_block_to_server) { |