From 454483f26610959526d97c1d318e0d699d78747d Mon Sep 17 00:00:00 2001 From: Lars Hofhansl Date: Sat, 11 Mar 2017 20:50:14 -0800 Subject: Use true distance for block priority. --- src/clientiface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/clientiface.cpp') diff --git a/src/clientiface.cpp b/src/clientiface.cpp index 76a34c392..11054969c 100644 --- a/src/clientiface.cpp +++ b/src/clientiface.cpp @@ -252,8 +252,8 @@ void RemoteClient::GetNextBlocks ( FOV setting. The default of 72 degrees is fine. */ - if(isBlockInSight(p, camera_pos, camera_dir, camera_fov, d_blocks_in_sight) == false) - { + f32 dist; + if (!isBlockInSight(p, camera_pos, camera_dir, camera_fov, d_blocks_in_sight, &dist)) { continue; } @@ -342,7 +342,7 @@ void RemoteClient::GetNextBlocks ( /* Add block to send queue */ - PrioritySortedBlockTransfer q((float)d, p, peer_id); + PrioritySortedBlockTransfer q((float)dist, p, peer_id); dest.push_back(q); -- cgit v1.2.3