1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Support game-specific minetest.conf

This commit is contained in:
Perttu Ahola 2013-03-21 21:42:23 +02:00
parent adc52f3f3c
commit c2250d95c4
6 changed files with 30 additions and 0 deletions

View file

@ -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));
}
}