mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Cleanup errors introduced in rebase.
This commit is contained in:
parent
4f31f1ca38
commit
308ad4d81e
@ -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);
|
||||
},
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user