aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 8f6257afe..b5352749c 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -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();