Loosen in_vd calculation on the server so that it accepts all chunks a client with the specified vd would request

This commit is contained in:
Imbris 2020-07-17 01:01:21 -04:00 committed by Treeco
parent 8c1854f22a
commit 9e880009e0

View File

@ -317,7 +317,8 @@ impl Sys {
pos.0.xy().map(|e| e as f64).distance(
key.map(|e| e as f64 + 0.5)
* TerrainChunkSize::RECT_SIZE.map(|e| e as f64),
) < (view_distance as f64 + 1.5) * TerrainChunkSize::RECT_SIZE.x as f64
) < (view_distance as f64 - 1.0 + 2.5 * 2.0_f64.sqrt())
* TerrainChunkSize::RECT_SIZE.x as f64
} else {
true
};