From d1d8b4e1c28911c551ef7331fd76085d5d62fe6a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 23 Jul 2014 23:41:56 +0300 Subject: In map remap db add patch and split files loading. New options in paths.xml: mapsRemapPatchFile - patch file name for remap db. mapsRemapPatchDir - dir with patch files. --- src/resources/db/mapdb.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/resources/db/mapdb.cpp') 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) -- cgit v1.2.3-70-g09d2