From e25a38e3fbb156ae2bc72cc66aef014ae3963407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Fri, 19 May 2017 07:25:27 +0200 Subject: When minimap is disabled in configuration, really disable it (#5771) * When minimap is disabled in configuration, really disable it --- src/client.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/client.cpp') 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) { -- cgit v1.2.3