aboutsummaryrefslogtreecommitdiff
path: root/src/content
diff options
context:
space:
mode:
authorlhofhansl <larsh@apache.org>2022-10-27 19:31:42 -0700
committerGitHub <noreply@github.com>2022-10-27 19:31:42 -0700
commit9aaed75eea0145ef3ee88bdd6d5507e5fd8d76c2 (patch)
treec884b5ade75411cf8a693519304e7d5d930b7f83 /src/content
parent88820cd31c2fe21c8c16ee547a3335131e8ba009 (diff)
downloadminetest-9aaed75eea0145ef3ee88bdd6d5507e5fd8d76c2.tar.xz
Safety check the map's blocksize (#12895)
Diffstat (limited to 'src/content')
-rw-r--r--src/content/subgames.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/content/subgames.cpp b/src/content/subgames.cpp
index d0de926ef..3658fa83e 100644
--- a/src/content/subgames.cpp
+++ b/src/content/subgames.cpp
@@ -390,6 +390,8 @@ void loadGameConfAndInitWorld(const std::string &path, const std::string &name,
conf.set("mod_storage_backend", "sqlite3");
conf.setBool("creative_mode", g_settings->getBool("creative_mode"));
conf.setBool("enable_damage", g_settings->getBool("enable_damage"));
+ if (MAP_BLOCKSIZE != 16)
+ conf.set("blocksize", std::to_string(MAP_BLOCKSIZE));
if (!conf.updateConfigFile(worldmt_path.c_str())) {
throw BaseException("Failed to update the config file");