mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Allow configuring block disk and net compression. Change default disk level.
This commit is contained in:
parent
d0a38f694d
commit
e638056523
10 changed files with 47 additions and 40 deletions
|
@ -2332,9 +2332,9 @@ void Server::SendBlockNoLock(session_t peer_id, MapBlock *block, u8 ver,
|
|||
/*
|
||||
Create a packet with the block in the right format
|
||||
*/
|
||||
|
||||
thread_local const int net_compression_level = rangelim(g_settings->getS16("map_compression_level_net"), -1, 9);
|
||||
std::ostringstream os(std::ios_base::binary);
|
||||
block->serialize(os, ver, false);
|
||||
block->serialize(os, ver, false, net_compression_level);
|
||||
block->serializeNetworkSpecific(os);
|
||||
std::string s = os.str();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue