1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

When minimap is disabled in configuration, really disable it (#5771)

* When minimap is disabled in configuration, really disable it
This commit is contained in:
Loïc Blot 2017-05-19 07:25:27 +02:00 committed by GitHub
parent 1c6d2f596d
commit e25a38e3fb
7 changed files with 28 additions and 19 deletions

View file

@ -1150,7 +1150,7 @@ void Client::handleCommand_HudSetFlags(NetworkPacket* pkt)
m_minimap_disabled_by_server = !(player->hud_flags & HUD_FLAG_MINIMAP_VISIBLE);
// Hide minimap if it has been disabled by the server
if (m_minimap_disabled_by_server && was_minimap_visible) {
if (m_minimap && m_minimap_disabled_by_server && was_minimap_visible) {
// defers a minimap update, therefore only call it if really
// needed, by checking that minimap was visible before
m_minimap->setMinimapMode(MINIMAP_MODE_OFF);