Skip to content

Commit

Permalink
Use true distance for block priority.
Browse files Browse the repository at this point in the history
  • Loading branch information
lhofhansl authored and SmallJoker committed Mar 15, 2017
1 parent 39fa249 commit 454483f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/clientiface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 454483f

Please sign in to comment.