diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-07-30 12:19:03 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-07-30 12:19:03 +0200 |
commit | 3d980cf5756aee9fc619e4d667f1427967dda53b (patch) | |
tree | 68719a610700a7c24dd3b95b3ce03f15ae763f04 /src/client/client.cpp | |
parent | 85574cb53c44610b230cb7ae69a5cc0b17bcf2f0 (diff) | |
download | dragonfireclient-3d980cf5756aee9fc619e4d667f1427967dda53b.tar.xz |
Improved Xray and Fullbright
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(), |