diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-10-04 22:22:55 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-10-04 22:22:55 +0200 |
commit | c36ff3edb1ee83eaff61490355ce58679ab687e3 (patch) | |
tree | ec5471713d9733d55dfc7571809ba6bde89507aa /src/client/client.cpp | |
parent | 0a2c90f4cfb0c8c4f4f2243944012443588098a5 (diff) | |
download | dragonfireclient-c36ff3edb1ee83eaff61490355ce58679ab687e3.tar.xz |
Added AutoSneak and improved X-Ray MapBlock updating
Diffstat (limited to 'src/client/client.cpp')
-rw-r--r-- | src/client/client.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp index d65dc510f..bbc32c6d4 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -1667,15 +1667,20 @@ void Client::addUpdateMeshTaskForNode(v3s16 nodepos, bool ack_to_server, bool ur void Client::updateAllMapBlocks() { + + v3s16 currentBlock = getNodeBlockPos(floatToInt(m_env.getLocalPlayer()->getPosition(), BS)); + addUpdateMeshTaskWithEdge(currentBlock, false, true); + 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); + for (MapBlock *block : blocks) { + addUpdateMeshTask(block->getPos(), false, true); + } } - //addUpdateMeshTaskWithEdge(getObjectBlockPos(m_env.getLocalPlayer()->getPosition()), false, false); } ClientEvent *Client::getClientEvent() |