Cleanup errors introduced in rebase.

This commit is contained in:
Avi Weinstock 2021-04-20 23:27:43 -04:00
parent 4f31f1ca38
commit 308ad4d81e
5 changed files with 3 additions and 5 deletions

View File

@ -1924,7 +1924,7 @@ impl Client {
match msg {
ServerGeneral::TerrainChunkUpdate { key, chunk } => {
if let Some(chunk) = chunk.ok().and_then(|c| c.decompress()) {
self.state.insert_chunk(key, chunk);
self.state.insert_chunk(key, Arc::new(chunk));
}
self.pending_chunks.remove(&key);
},

View File

@ -12,7 +12,7 @@ use common::{
};
use hashbrown::HashMap;
use serde::{Deserialize, Serialize};
use std::{sync::Arc, time::Duration};
use std::time::Duration;
use vek::*;
///This struct contains all messages the server might send (on different

View File

@ -9,7 +9,6 @@ use common_ecs::{Job, Origin, ParMode, Phase, System};
use common_net::msg::{ClientGeneral, CompressedData, ServerGeneral};
use rayon::iter::ParallelIterator;
use specs::{Entities, Join, ParJoin, Read, ReadExpect, ReadStorage};
use std::sync::Arc;
use tracing::{debug, trace};
/// This system will handle new messages from clients

View File

@ -246,7 +246,7 @@ impl<'a> System<'a> for Sys {
new_chunks.into_par_iter().for_each(|(key, chunk)| {
let mut msg = Some(ServerGeneral::TerrainChunkUpdate {
key,
chunk: Ok(chunk),
chunk: Ok(CompressedData::compress(&*chunk, 5)),
});
let mut lazy_msg = None;

View File

@ -4,7 +4,6 @@ use common_ecs::{Job, Origin, Phase, System};
use common_net::msg::{CompressedData, ServerGeneral};
use common_state::TerrainChanges;
use specs::{Join, Read, ReadExpect, ReadStorage};
use std::sync::Arc;
/// This systems sends new chunks to clients as well as changes to existing
/// chunks