diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-10-05 22:25:36 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-10-05 22:25:36 +0200 |
commit | 43ee069dbf0dc805277fcee9f1ac8925da2a4061 (patch) | |
tree | d7a336fcb42a075a1ca8162b2d550f146ffb4620 /src/client/client.cpp | |
parent | faa32610e381db1d58ee2b57d3a6efc2e664fdec (diff) | |
download | dragonfireclient-43ee069dbf0dc805277fcee9f1ac8925da2a4061.tar.xz |
Improved X-Ray, added AutoEject
Diffstat (limited to 'src/client/client.cpp')
-rw-r--r-- | src/client/client.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp index d3e7a278d..aa3e257ac 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -1664,9 +1664,12 @@ 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); + + for (s16 X = currentBlock.X - 2; X <= currentBlock.X + 2; X++) + for (s16 Y = currentBlock.Y - 2; Y <= currentBlock.Y + 2; Y++) + for (s16 Z = currentBlock.Z - 2; Z <= currentBlock.Z + 2; Z++) + addUpdateMeshTask(v3s16(X, Y, Z), false, true); std::map<v2s16, MapSector*> *sectors = m_env.getMap().getSectorsPtr(); |