mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Safety check the map's blocksize (#12895)
This commit is contained in:
parent
88820cd31c
commit
9aaed75eea
2 changed files with 9 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue