diff options
author | est31 <MTest31@outlook.com> | 2016-02-09 07:08:31 +0100 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2016-03-07 19:54:26 +0100 |
commit | d494733839e9cf6cb557462326ed21e7a58816c7 (patch) | |
tree | 07ead00672b0096aa2a60938b769bf030bba2951 /src/server.cpp | |
parent | 88fbe7ca1e5451851ee0c7ab5524c39a7bb703c2 (diff) | |
download | minetest-d494733839e9cf6cb557462326ed21e7a58816c7.tar.gz minetest-d494733839e9cf6cb557462326ed21e7a58816c7.tar.bz2 minetest-d494733839e9cf6cb557462326ed21e7a58816c7.zip |
Add minetest.register_lbm() to run code on block load only
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server.cpp b/src/server.cpp index c4ed32253..75ca7448f 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -344,10 +344,11 @@ Server::Server( servermap->addEventReceiver(this); // If file exists, load environment metadata - if(fs::PathExists(m_path_world + DIR_DELIM "env_meta.txt")) - { - infostream<<"Server: Loading environment metadata"<<std::endl; + if (fs::PathExists(m_path_world + DIR_DELIM "env_meta.txt")) { + infostream << "Server: Loading environment metadata" << std::endl; m_env->loadMeta(); + } else { + m_env->loadDefaultMeta(); } // Add some test ActiveBlockModifiers to environment |