diff options
Diffstat (limited to 'src/client/client.cpp')
-rw-r--r-- | src/client/client.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp index f7fc637db..fe77ec7a8 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -41,6 +41,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "filesys.h" #include "mapblock_mesh.h" #include "mapblock.h" +#include "mapsector.h" #include "minimap.h" #include "modchannels.h" #include "content/mods.h" @@ -1239,12 +1240,6 @@ void Client::sendChatMessage(const std::wstring &message) infostream << "Could not queue chat message because maximum out chat queue size (" << max_queue_size << ") is reached." << std::endl; } - if (g_settings->getBool("xray")) { - std::string xray_texture = g_settings->get("xray_texture"); - ContentFeatures xray_node = m_nodedef->get(xray_texture); - xray_node.drawtype = NDT_AIRLIKE; - m_nodedef->set(xray_texture, xray_node); - } } void Client::clearOutChatQueue() @@ -1675,6 +1670,18 @@ void Client::addUpdateMeshTaskForNode(v3s16 nodepos, bool ack_to_server, bool ur } } +void Client::updateAllMapBlocks() +{ + std::map<v2s16, MapSector*> *sectors = m_env.getMap().getSectorsPtr(); + for (auto §or_it : *sectors) { + MapSector *sector = sector_it.second; + MapBlockVect blocks; + sector->getBlocks(blocks); + for (MapBlock *block : blocks) + addUpdateMeshTask(block->getPos(), false, false); + } +} + ClientEvent *Client::getClientEvent() { FATAL_ERROR_IF(m_client_event_queue.empty(), |