Skip to content

Commit 65d1cb8

Browse files
committedMar 26, 2014
Fix bug in RemoteClient::GetNextBlocks
1 parent 564e11f commit 65d1cb8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/clientiface.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ void RemoteClient::GetNextBlocks(
140140
*/
141141
s32 new_nearest_unsent_d = -1;
142142

143-
s16 d_max = g_settings->getS16("max_block_send_distance");
143+
const s16 full_d_max = g_settings->getS16("max_block_send_distance");
144+
s16 d_max = full_d_max;
144145
s16 d_max_gen = g_settings->getS16("max_block_generate_distance");
145146

146147
// Don't loop very much at a time
@@ -214,7 +215,7 @@ void RemoteClient::GetNextBlocks(
214215
generate = false;*/
215216

216217
// Limit the send area vertically to 1/2
217-
if(abs(p.Y - center.Y) > d_max / 2)
218+
if(abs(p.Y - center.Y) > full_d_max / 2)
218219
continue;
219220
}
220221

0 commit comments

Comments
 (0)
Please sign in to comment.