summaryrefslogtreecommitdiff
path: root/src/clientiface.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2014-03-26 18:53:11 +0200
committerPerttu Ahola <celeron55@gmail.com>2014-03-26 18:58:39 +0200
commit65d1cb8321d4a0519ded130c69ca16a1b9d8a3cc (patch)
tree6f1c6758be35c1464bfcb0d5677e7934327de472 /src/clientiface.cpp
parent564e11fc2f3731383cecedac8aade4dd9ecdc243 (diff)
downloadminetest-65d1cb8321d4a0519ded130c69ca16a1b9d8a3cc.tar.gz
minetest-65d1cb8321d4a0519ded130c69ca16a1b9d8a3cc.tar.bz2
minetest-65d1cb8321d4a0519ded130c69ca16a1b9d8a3cc.zip
Fix bug in RemoteClient::GetNextBlocks
Diffstat (limited to 'src/clientiface.cpp')
-rw-r--r--src/clientiface.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/clientiface.cpp b/src/clientiface.cpp
index 06d87d2a4..5394cd002 100644
--- a/src/clientiface.cpp
+++ b/src/clientiface.cpp
@@ -140,7 +140,8 @@ void RemoteClient::GetNextBlocks(
*/
s32 new_nearest_unsent_d = -1;
- s16 d_max = g_settings->getS16("max_block_send_distance");
+ const s16 full_d_max = g_settings->getS16("max_block_send_distance");
+ s16 d_max = full_d_max;
s16 d_max_gen = g_settings->getS16("max_block_generate_distance");
// Don't loop very much at a time
@@ -214,7 +215,7 @@ void RemoteClient::GetNextBlocks(
generate = false;*/
// Limit the send area vertically to 1/2
- if(abs(p.Y - center.Y) > d_max / 2)
+ if(abs(p.Y - center.Y) > full_d_max / 2)
continue;
}