Merge branch 'imbris/vdfix' into 'master'

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

See merge request veloren/veloren!1213
This commit is contained in:
Imbris 2020-07-17 18:04:40 +00:00
commit d387709ed0

View File

@ -317,7 +317,8 @@ impl Sys {
pos.0.xy().map(|e| e as f64).distance( pos.0.xy().map(|e| e as f64).distance(
key.map(|e| e as f64 + 0.5) key.map(|e| e as f64 + 0.5)
* TerrainChunkSize::RECT_SIZE.map(|e| e as f64), * 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 { } else {
true true
}; };