aboutsummaryrefslogtreecommitdiff
path: root/src/defaultsettings.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2013-03-21 21:42:23 +0200
committerPerttu Ahola <celeron55@gmail.com>2013-03-21 22:22:15 +0200
commitc2250d95c4da368d1535794a1c7f2092ce479d7a (patch)
tree3cb15d732e93b02986393eb005eeb3a3d7b3493d /src/defaultsettings.cpp
parentadc52f3f3c041e5914f665b6f96d07f49bbb6487 (diff)
downloadminetest-c2250d95c4da368d1535794a1c7f2092ce479d7a.tar.gz
minetest-c2250d95c4da368d1535794a1c7f2092ce479d7a.tar.bz2
minetest-c2250d95c4da368d1535794a1c7f2092ce479d7a.zip
Support game-specific minetest.conf
Diffstat (limited to 'src/defaultsettings.cpp')
-rw-r--r--src/defaultsettings.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index b0ae271ce..25edffe32 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -243,3 +243,12 @@ void set_default_settings(Settings *settings)
}
+void override_default_settings(Settings *settings, Settings *from)
+{
+ std::vector<std::string> names = from->getNames();
+ for(size_t i=0; i<names.size(); i++){
+ const std::string &name = names[i];
+ settings->setDefault(name, from->get(name));
+ }
+}
+