diff options
author | Lars Hofhansl <larsh@apache.org> | 2017-03-11 20:50:14 -0800 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2017-03-15 20:30:34 +0100 |
commit | 454483f26610959526d97c1d318e0d699d78747d (patch) | |
tree | 3f7c47ef2a24908807108e34de9f38f4c0dabb6b | |
parent | 39fa249f91b7cb9031ed43776b07155755f76cae (diff) | |
download | minetest-454483f26610959526d97c1d318e0d699d78747d.tar.gz minetest-454483f26610959526d97c1d318e0d699d78747d.tar.bz2 minetest-454483f26610959526d97c1d318e0d699d78747d.zip |
Use true distance for block priority.
-rw-r--r-- | src/clientiface.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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); |