mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
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:
commit
991ccf0033
@ -79,7 +79,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
network_metrics.chunks_served_from_memory.inc();
|
network_metrics.chunks_served_from_memory.inc();
|
||||||
client.send(ServerGeneral::TerrainChunkUpdate {
|
client.send(ServerGeneral::TerrainChunkUpdate {
|
||||||
key,
|
key,
|
||||||
chunk: Ok(CompressedData::compress(&chunk, 5)),
|
chunk: Ok(CompressedData::compress(&chunk, 1)),
|
||||||
})?
|
})?
|
||||||
},
|
},
|
||||||
None => {
|
None => {
|
||||||
|
@ -224,7 +224,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
new_chunks.into_par_iter().for_each(|(key, chunk)| {
|
new_chunks.into_par_iter().for_each(|(key, chunk)| {
|
||||||
let mut msg = Some(ServerGeneral::TerrainChunkUpdate {
|
let mut msg = Some(ServerGeneral::TerrainChunkUpdate {
|
||||||
key,
|
key,
|
||||||
chunk: Ok(CompressedData::compress(&*chunk, 5)),
|
chunk: Ok(CompressedData::compress(&*chunk, 1)),
|
||||||
});
|
});
|
||||||
let mut lazy_msg = None;
|
let mut lazy_msg = None;
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
lazy_msg = Some(client.prepare(ServerGeneral::TerrainChunkUpdate {
|
lazy_msg = Some(client.prepare(ServerGeneral::TerrainChunkUpdate {
|
||||||
key: *chunk_key,
|
key: *chunk_key,
|
||||||
chunk: Ok(match terrain.get_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,
|
None => break 'chunk,
|
||||||
}),
|
}),
|
||||||
}));
|
}));
|
||||||
@ -55,7 +55,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
for (_, client) in (&presences, &clients).join() {
|
for (_, client) in (&presences, &clients).join() {
|
||||||
if lazy_msg.is_none() {
|
if lazy_msg.is_none() {
|
||||||
lazy_msg = Some(client.prepare(ServerGeneral::TerrainBlockUpdates(
|
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));
|
lazy_msg.as_ref().map(|ref msg| client.send_prepared(&msg));
|
||||||
|
Loading…
Reference in New Issue
Block a user