summaryrefslogtreecommitdiff
path: root/src/resources/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/db')
-rw-r--r--src/resources/db/mapdb.cpp10
-rw-r--r--src/resources/db/mapdb.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/src/resources/db/mapdb.cpp b/src/resources/db/mapdb.cpp
index 130e82fda..f0c9d988c 100644
--- a/src/resources/db/mapdb.cpp
+++ b/src/resources/db/mapdb.cpp
@@ -47,17 +47,19 @@ void MapDB::load()
if (mLoaded)
unload();
- loadRemap();
+ loadRemapXmlFile(paths.getStringValue("mapsRemapFile"));
+ loadRemapXmlFile(paths.getStringValue("mapsRemapPatchFile"));
+ loadXmlDir("mapsRemapPatchDir", loadRemapXmlFile);
+
loadInfo(paths.getStringValue("mapsFile"));
loadInfo(paths.getStringValue("mapsPatchFile"));
loadXmlDir("mapsPatchDir", loadInfo);
mLoaded = true;
}
-void MapDB::loadRemap()
+void MapDB::loadRemapXmlFile(const std::string &fileName)
{
- XML::Document *const doc = new XML::Document(
- paths.getStringValue("mapsRemapFile"));
+ XML::Document *const doc = new XML::Document(fileName);
const XmlNodePtrConst root = doc->rootNode();
if (!root)
diff --git a/src/resources/db/mapdb.h b/src/resources/db/mapdb.h
index a7629ba08..8e2bd6a2c 100644
--- a/src/resources/db/mapdb.h
+++ b/src/resources/db/mapdb.h
@@ -40,7 +40,7 @@ namespace MapDB
*/
void load();
- void loadRemap();
+ void loadRemapXmlFile(const std::string &fileName);
void loadInfo(const std::string &fileName);