aboutsummaryrefslogtreecommitdiff
path: root/src/client/client.cpp
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2020-10-05 22:25:36 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2020-10-05 22:25:36 +0200
commit43ee069dbf0dc805277fcee9f1ac8925da2a4061 (patch)
treed7a336fcb42a075a1ca8162b2d550f146ffb4620 /src/client/client.cpp
parentfaa32610e381db1d58ee2b57d3a6efc2e664fdec (diff)
downloaddragonfireclient-43ee069dbf0dc805277fcee9f1ac8925da2a4061.tar.xz
Improved X-Ray, added AutoEject
Diffstat (limited to 'src/client/client.cpp')
-rw-r--r--src/client/client.cpp7
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();