- updated game data mismatch display
This commit is contained in:
parent
8884c32e78
commit
f765ab0880
|
@ -529,27 +529,21 @@ void MenuStateConnectedGame::update() {
|
||||||
|
|
||||||
if(updateDataSynchDetailText == true &&
|
if(updateDataSynchDetailText == true &&
|
||||||
clientInterface->getReceivedDataSynchCheck() &&
|
clientInterface->getReceivedDataSynchCheck() &&
|
||||||
lastMapDataSynchError != "map CRC mismatch") {
|
lastMapDataSynchError != "map CRC mismatch, " + listBoxMap.getSelectedItem()) {
|
||||||
lastMapDataSynchError = "map CRC mismatch";
|
lastMapDataSynchError = "map CRC mismatch, " + listBoxMap.getSelectedItem();
|
||||||
clientInterface->sendTextMessage(lastMapDataSynchError,-1,true);
|
clientInterface->sendTextMessage(lastMapDataSynchError,-1,true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
lastMapDataSynchError = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(clientInterface->getNetworkGameDataSynchCheckOkTile() == false) {
|
if(clientInterface->getNetworkGameDataSynchCheckOkTile() == false) {
|
||||||
label = label + " tile";
|
label = label + " tile";
|
||||||
if(updateDataSynchDetailText == true &&
|
if(updateDataSynchDetailText == true &&
|
||||||
clientInterface->getReceivedDataSynchCheck() &&
|
clientInterface->getReceivedDataSynchCheck() &&
|
||||||
lastTileDataSynchError != "tile CRC mismatch") {
|
lastTileDataSynchError != "tile CRC mismatch, " + listBoxTileset.getSelectedItem()) {
|
||||||
lastTileDataSynchError = "tile CRC mismatch";
|
lastTileDataSynchError = "tile CRC mismatch, " + listBoxTileset.getSelectedItem();
|
||||||
clientInterface->sendTextMessage(lastTileDataSynchError,-1,true);
|
clientInterface->sendTextMessage(lastTileDataSynchError,-1,true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
lastTileDataSynchError = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(clientInterface->getNetworkGameDataSynchCheckOkTech() == false) {
|
if(clientInterface->getNetworkGameDataSynchCheckOkTech() == false) {
|
||||||
label = label + " techtree";
|
label = label + " techtree";
|
||||||
|
@ -572,9 +566,6 @@ void MenuStateConnectedGame::update() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
lastTechtreeDataSynchError = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(clientInterface->getReceivedDataSynchCheck() == true) {
|
if(clientInterface->getReceivedDataSynchCheck() == true) {
|
||||||
updateDataSynchDetailText = false;
|
updateDataSynchDetailText = false;
|
||||||
|
|
|
@ -505,6 +505,10 @@ NetworkMessageSynchNetworkGameData::NetworkMessageSynchNetworkGameData(const Gam
|
||||||
|
|
||||||
string NetworkMessageSynchNetworkGameData::getTechCRCFileMismatchReport(vector<std::pair<string,int32> > &vctFileList) {
|
string NetworkMessageSynchNetworkGameData::getTechCRCFileMismatchReport(vector<std::pair<string,int32> > &vctFileList) {
|
||||||
string result = "Techtree: [" + data.header.tech.getString() + "] Filecount local: " + intToStr(vctFileList.size()) + " remote: " + intToStr(data.header.techCRCFileCount) + "\n";
|
string result = "Techtree: [" + data.header.tech.getString() + "] Filecount local: " + intToStr(vctFileList.size()) + " remote: " + intToStr(data.header.techCRCFileCount) + "\n";
|
||||||
|
if(vctFileList.size() <= 0) {
|
||||||
|
result = result + "Local player has no files.\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
for(int idx = 0; idx < vctFileList.size(); ++idx) {
|
for(int idx = 0; idx < vctFileList.size(); ++idx) {
|
||||||
std::pair<string,int32> &fileInfo = vctFileList[idx];
|
std::pair<string,int32> &fileInfo = vctFileList[idx];
|
||||||
bool fileFound = false;
|
bool fileFound = false;
|
||||||
|
@ -548,7 +552,7 @@ string NetworkMessageSynchNetworkGameData::getTechCRCFileMismatchReport(vector<s
|
||||||
result = result + "remote file [" + networkFile + "] CRC mismatch.\n";
|
result = result + "remote file [" + networkFile + "] CRC mismatch.\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -691,6 +695,10 @@ NetworkMessageSynchNetworkGameDataStatus::NetworkMessageSynchNetworkGameDataStat
|
||||||
|
|
||||||
string NetworkMessageSynchNetworkGameDataStatus::getTechCRCFileMismatchReport(string techtree, vector<std::pair<string,int32> > &vctFileList) {
|
string NetworkMessageSynchNetworkGameDataStatus::getTechCRCFileMismatchReport(string techtree, vector<std::pair<string,int32> > &vctFileList) {
|
||||||
string result = "Techtree: [" + techtree + "] Filecount local: " + intToStr(vctFileList.size()) + " remote: " + intToStr(data.header.techCRCFileCount) + "\n";
|
string result = "Techtree: [" + techtree + "] Filecount local: " + intToStr(vctFileList.size()) + " remote: " + intToStr(data.header.techCRCFileCount) + "\n";
|
||||||
|
if(vctFileList.size() <= 0) {
|
||||||
|
result = result + "Local player has no files.\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
for(int idx = 0; idx < vctFileList.size(); ++idx) {
|
for(int idx = 0; idx < vctFileList.size(); ++idx) {
|
||||||
std::pair<string,int32> &fileInfo = vctFileList[idx];
|
std::pair<string,int32> &fileInfo = vctFileList[idx];
|
||||||
bool fileFound = false;
|
bool fileFound = false;
|
||||||
|
@ -735,7 +743,7 @@ string NetworkMessageSynchNetworkGameDataStatus::getTechCRCFileMismatchReport(st
|
||||||
result = result + "remote file [" + networkFile + "] CRC mismatch.\n";
|
result = result + "remote file [" + networkFile + "] CRC mismatch.\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user