From e703c5b81f87550e636ebb1ebb1eb64027a44687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Mart=C3=ADnez?= Date: Wed, 24 Apr 2013 07:52:46 -0300 Subject: Added support to disable built-in HUD elements --- src/client.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 12ced17fe..941e9e882 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -2114,6 +2114,20 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id) event.hudchange.data = intdata; m_client_event_queue.push_back(event); } + else if(command == TOCLIENT_HUD_BUILTIN_ENABLE) + { + std::string datastring((char *)&data[2], datasize - 2); + std::istringstream is(datastring, std::ios_base::binary); + + u32 id = readU8(is); + bool flag = (readU8(is) ? true : false); + + ClientEvent event; + event.type = CE_HUD_BUILTIN_ENABLE; + event.hudbuiltin.id = (HudBuiltinElement)id; + event.hudbuiltin.flag = flag; + m_client_event_queue.push_back(event); + } else { infostream<<"Client: Ignoring unknown command " -- cgit v1.2.3