Merge branch 'aweinstock/deflate-downgrade-20210425' into 'master'

Downgrade deflate from level 5 to level 1 in the terrain system to match LZ4's...

See merge request veloren/veloren!2199
This commit is contained in:
Marcel 2021-04-25 23:35:43 +00:00
commit 991ccf0033
3 changed files with 4 additions and 4 deletions

View File

@ -79,7 +79,7 @@ impl<'a> System<'a> for Sys {
network_metrics.chunks_served_from_memory.inc();
client.send(ServerGeneral::TerrainChunkUpdate {
key,
chunk: Ok(CompressedData::compress(&chunk, 5)),
chunk: Ok(CompressedData::compress(&chunk, 1)),
})?
},
None => {

View File

@ -224,7 +224,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(CompressedData::compress(&*chunk, 5)),
chunk: Ok(CompressedData::compress(&*chunk, 1)),
});
let mut lazy_msg = None;

View File

@ -38,7 +38,7 @@ impl<'a> System<'a> for Sys {
lazy_msg = Some(client.prepare(ServerGeneral::TerrainChunkUpdate {
key: *chunk_key,
chunk: Ok(match terrain.get_key(*chunk_key) {
Some(chunk) => CompressedData::compress(&chunk, 5),
Some(chunk) => CompressedData::compress(&chunk, 1),
None => break 'chunk,
}),
}));
@ -55,7 +55,7 @@ impl<'a> System<'a> for Sys {
for (_, client) in (&presences, &clients).join() {
if lazy_msg.is_none() {
lazy_msg = Some(client.prepare(ServerGeneral::TerrainBlockUpdates(
CompressedData::compress(&terrain_changes.modified_blocks, 2),
CompressedData::compress(&terrain_changes.modified_blocks, 1),
)));
}
lazy_msg.as_ref().map(|ref msg| client.send_prepared(&msg));