mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-30 12:43:49 +01:00
Allow configuring block disk and net compression. Change default disk level.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user