mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Temporary networking issue fix
Former-commit-id: e6b47f7d8478c28d837e55b85f2f2d028e988737
This commit is contained in:
parent
54cc9e137a
commit
faf53ad5c9
@ -212,12 +212,13 @@ impl Client {
|
||||
}
|
||||
|
||||
// Request chunks from the server
|
||||
for i in chunk_pos.x - 3..chunk_pos.x + 4 {
|
||||
for j in chunk_pos.y - 3..chunk_pos.y + 4 {
|
||||
for i in chunk_pos.x - 4..chunk_pos.x + 5 {
|
||||
for j in chunk_pos.y - 4..chunk_pos.y + 5 {
|
||||
for k in 0..2 {
|
||||
let key = Vec3::new(i, j, k);
|
||||
if self.state.terrain().get_key(key).is_none()
|
||||
&& !self.pending_chunks.contains(&key)
|
||||
&& self.pending_chunks.len() < 4
|
||||
{
|
||||
self.postbox
|
||||
.send_message(ClientMsg::TerrainChunkRequest { key });
|
||||
|
@ -202,7 +202,7 @@ impl Server {
|
||||
.map(|e: i32| e.abs())
|
||||
.reduce_max();
|
||||
|
||||
if dist < 5 {
|
||||
if dist < 7 {
|
||||
self.clients.notify(
|
||||
entity,
|
||||
ServerMsg::TerrainChunkUpdate {
|
||||
@ -234,7 +234,7 @@ impl Server {
|
||||
min_dist = min_dist.min(dist);
|
||||
}
|
||||
|
||||
if min_dist > 5 {
|
||||
if min_dist > 7 {
|
||||
chunks_to_remove.push(key);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user