mirror of
https://github.com/glest/glest-source.git
synced 2025-08-21 15:41:24 +02:00
bugfix for crc checking after download of missing content and server changes to different data then the data downloaded
This commit is contained in:
@@ -3932,8 +3932,15 @@ void MenuStateConnectedGame::FTPClient_CallbackEvent(string itemName,
|
|||||||
Checksum::clearFileCache();
|
Checksum::clearFileCache();
|
||||||
Checksum checksum;
|
Checksum checksum;
|
||||||
string file = Map::getMapPath(itemName,"",false);
|
string file = Map::getMapPath(itemName,"",false);
|
||||||
|
|
||||||
|
//printf("Got map itemName [%s] file [%s] lastCheckedCRCMapName [%s] gameSettings->getMap() [%s]\n",
|
||||||
|
// itemName.c_str(),file.c_str(),lastCheckedCRCMapName.c_str(),gameSettings->getMap().c_str());
|
||||||
|
|
||||||
|
if(gameSettings != NULL && lastCheckedCRCMapName == gameSettings->getMap() &&
|
||||||
|
gameSettings->getMap() != "") {
|
||||||
checksum.addFile(file);
|
checksum.addFile(file);
|
||||||
lastCheckedCRCMapValue = checksum.getSum();
|
lastCheckedCRCMapValue = checksum.getSum();
|
||||||
|
}
|
||||||
|
|
||||||
Lang &lang= Lang::getInstance();
|
Lang &lang= Lang::getInstance();
|
||||||
const vector<string> languageList = clientInterface->getGameSettings()->getUniqueNetworkPlayerLanguages();
|
const vector<string> languageList = clientInterface->getGameSettings()->getUniqueNetworkPlayerLanguages();
|
||||||
@@ -4017,8 +4024,15 @@ void MenuStateConnectedGame::FTPClient_CallbackEvent(string itemName,
|
|||||||
clearFolderTreeContentsCheckSumList(paths, pathSearchString, filterFileExt);
|
clearFolderTreeContentsCheckSumList(paths, pathSearchString, filterFileExt);
|
||||||
|
|
||||||
// Refresh CRC
|
// Refresh CRC
|
||||||
|
|
||||||
|
//printf("Got map itemName [%s] file [%s] lastCheckedCRCMapName [%s] gameSettings->getMap() [%s]\n",
|
||||||
|
// itemName.c_str(),file.c_str(),lastCheckedCRCMapName.c_str(),gameSettings->getMap().c_str());
|
||||||
|
|
||||||
|
if(gameSettings != NULL && lastCheckedCRCTilesetName == gameSettings->getTileset() &&
|
||||||
|
gameSettings->getTileset() != "") {
|
||||||
Config &config = Config::getInstance();
|
Config &config = Config::getInstance();
|
||||||
lastCheckedCRCTilesetValue = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTilesets,""), string("/") + itemName + string("/*"), ".xml", NULL, true);
|
lastCheckedCRCTilesetValue = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTilesets,""), string("/") + itemName + string("/*"), ".xml", NULL, true);
|
||||||
|
}
|
||||||
|
|
||||||
safeMutexFTPProgress.ReleaseLock();
|
safeMutexFTPProgress.ReleaseLock();
|
||||||
// END
|
// END
|
||||||
@@ -4100,9 +4114,11 @@ void MenuStateConnectedGame::FTPClient_CallbackEvent(string itemName,
|
|||||||
clearFolderTreeContentsCheckSumList(paths, pathSearchString, filterFileExt);
|
clearFolderTreeContentsCheckSumList(paths, pathSearchString, filterFileExt);
|
||||||
|
|
||||||
// Refresh CRC
|
// Refresh CRC
|
||||||
|
if(gameSettings != NULL && lastCheckedCRCTechtreeName == gameSettings->getTech() &&
|
||||||
|
gameSettings->getTech() != "") {
|
||||||
Config &config = Config::getInstance();
|
Config &config = Config::getInstance();
|
||||||
lastCheckedCRCTechtreeValue = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTechs,""), string("/") + itemName + string("/*"), ".xml", NULL, true);
|
lastCheckedCRCTechtreeValue = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTechs,""), string("/") + itemName + string("/*"), ".xml", NULL, true);
|
||||||
|
}
|
||||||
safeMutexFTPProgress.ReleaseLock();
|
safeMutexFTPProgress.ReleaseLock();
|
||||||
// END
|
// END
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user