aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/clientpackethandler.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp
index 1d5a28277..86bb88f61 100644
--- a/src/network/clientpackethandler.cpp
+++ b/src/network/clientpackethandler.cpp
@@ -1183,18 +1183,23 @@ void Client::handleCommand_HudSetFlags(NetworkPacket* pkt)
assert(player != NULL);
bool was_minimap_visible = player->hud_flags & HUD_FLAG_MINIMAP_VISIBLE;
+ bool was_minimap_radar_visible = player->hud_flags & HUD_FLAG_MINIMAP_RADAR_VISIBLE;
player->hud_flags &= ~mask;
player->hud_flags |= flags;
m_minimap_disabled_by_server = !(player->hud_flags & HUD_FLAG_MINIMAP_VISIBLE);
+ bool m_minimap_radar_disabled_by_server = !(player->hud_flags & HUD_FLAG_MINIMAP_RADAR_VISIBLE);
// Hide minimap if it has been disabled by the server
- if (m_minimap && 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);
- }
+
+ // Switch to surface mode if radar disabled by server
+ if (m_minimap && m_minimap_radar_disabled_by_server && was_minimap_radar_visible)
+ m_minimap->setMinimapMode(MINIMAP_MODE_SURFACEx1);
}
void Client::handleCommand_HudSetParam(NetworkPacket* pkt)