- bugfix for faction crc checks

This commit is contained in:
Mark Vejvoda 2011-03-19 18:05:13 +00:00
parent 59fc55ffee
commit 513d3f1d3e
2 changed files with 11 additions and 2 deletions

View File

@ -1013,7 +1013,12 @@ void MenuStateConnectedGame::update() {
factionCRCList.clear();
for(unsigned int factionIdx = 0; factionIdx < factionFiles.size(); ++factionIdx) {
string factionName = factionFiles[factionIdx];
int32 factionCRC = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTechs,""), "/" + gameSettings->getTech() + "/factions/" + factionName + "/*", ".xml", NULL, true);
int32 factionCRC = 0;
if(factionName != GameConstants::RANDOMFACTION_SLOTNAME &&
factionName != GameConstants::OBSERVER_SLOTNAME &&
factionName != ITEM_MISSING) {
factionCRC = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTechs,""), "/" + gameSettings->getTech() + "/factions/" + factionName + "/*", ".xml", NULL, true);
}
factionCRCList.push_back(make_pair(factionName,factionCRC));
}
console.addLine("Found factions: " + intToStr(factionCRCList.size()));

View File

@ -2243,7 +2243,11 @@ void MenuStateCustomGame::loadGameSettings(GameSettings *gameSettings) {
factionCRCList.clear();
for(unsigned int factionIdx = 0; factionIdx < factionFiles.size(); ++factionIdx) {
string factionName = factionFiles[factionIdx];
int32 factionCRC = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTechs,""), "/" + gameSettings->getTech() + "/factions/" + factionName + "/*", ".xml", NULL, true);
int32 factionCRC = 0;
if(factionName != GameConstants::RANDOMFACTION_SLOTNAME &&
factionName != GameConstants::OBSERVER_SLOTNAME) {
factionCRC = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTechs,""), "/" + gameSettings->getTech() + "/factions/" + factionName + "/*", ".xml", NULL, true);
}
factionCRCList.push_back(make_pair(factionName,factionCRC));
}
console.addLine("Found factions: " + intToStr(factionCRCList.size()));