summaryrefslogtreecommitdiff
path: root/src/clientiface.cpp
diff options
context:
space:
mode:
authorrubenwardy <rubenwardy@gmail.com>2015-07-13 16:01:31 +0100
committerest31 <MTest31@outlook.com>2015-08-02 14:27:04 +0200
commitec796b8e814864b433aea75119c307f44b2b33e8 (patch)
tree4e151014740276ca0c3614e03dc90fbc7b46b4ac /src/clientiface.cpp
parenta5e5aa5be978d2f6e23d4eeab04d2ac9beefe170 (diff)
downloadminetest-ec796b8e814864b433aea75119c307f44b2b33e8.tar.gz
minetest-ec796b8e814864b433aea75119c307f44b2b33e8.tar.bz2
minetest-ec796b8e814864b433aea75119c307f44b2b33e8.zip
Add map limit config option
Diffstat (limited to 'src/clientiface.cpp')
-rw-r--r--src/clientiface.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/clientiface.cpp b/src/clientiface.cpp
index 6944e56db..3330e0af9 100644
--- a/src/clientiface.cpp
+++ b/src/clientiface.cpp
@@ -209,25 +209,19 @@ void RemoteClient::GetNextBlocks (
max_simul_dynamic = max_simul_sends_setting;
// Don't select too many blocks for sending
- if(num_blocks_selected >= max_simul_dynamic)
- {
+ if (num_blocks_selected >= max_simul_dynamic) {
//queue_is_full = true;
goto queue_full_break;
}
// Don't send blocks that are currently being transferred
- if(m_blocks_sending.find(p) != m_blocks_sending.end())
+ if (m_blocks_sending.find(p) != m_blocks_sending.end())
continue;
/*
Do not go over-limit
*/
- if(p.X < -MAP_GENERATION_LIMIT / MAP_BLOCKSIZE
- || p.X > MAP_GENERATION_LIMIT / MAP_BLOCKSIZE
- || p.Y < -MAP_GENERATION_LIMIT / MAP_BLOCKSIZE
- || p.Y > MAP_GENERATION_LIMIT / MAP_BLOCKSIZE
- || p.Z < -MAP_GENERATION_LIMIT / MAP_BLOCKSIZE
- || p.Z > MAP_GENERATION_LIMIT / MAP_BLOCKSIZE)
+ if (blockpos_over_limit(p))
continue;
// If this is true, inexistent block will be made from scratch
@@ -239,7 +233,7 @@ void RemoteClient::GetNextBlocks (
generate = false;*/
// Limit the send area vertically to 1/2
- if(abs(p.Y - center.Y) > full_d_max / 2)
+ if (abs(p.Y - center.Y) > full_d_max / 2)
continue;
}