mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 14:11:15 +02:00
Added more info in data synch check debugging
This commit is contained in:
@@ -200,8 +200,8 @@ void ClientInterface::updateLobby()
|
|||||||
this->setNetworkGameDataSynchCheckOkTile((tilesetCRC == networkMessageSynchNetworkGameData.getTilesetCRC()));
|
this->setNetworkGameDataSynchCheckOkTile((tilesetCRC == networkMessageSynchNetworkGameData.getTilesetCRC()));
|
||||||
if(this->getNetworkGameDataSynchCheckOkTile() == false)
|
if(this->getNetworkGameDataSynchCheckOkTile() == false)
|
||||||
{
|
{
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] tilesetCRC mismatch, local = %d, remote = %d\n",
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] tilesetCRC mismatch, local = %d, remote = %d, networkMessageSynchNetworkGameData.getTileset() = [%s]\n",
|
||||||
__FILE__,__FUNCTION__,tilesetCRC,networkMessageSynchNetworkGameData.getTilesetCRC());
|
__FILE__,__FUNCTION__,tilesetCRC,networkMessageSynchNetworkGameData.getTilesetCRC(),networkMessageSynchNetworkGameData.getTileset().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -213,8 +213,8 @@ void ClientInterface::updateLobby()
|
|||||||
|
|
||||||
if(this->getNetworkGameDataSynchCheckOkTech() == false)
|
if(this->getNetworkGameDataSynchCheckOkTech() == false)
|
||||||
{
|
{
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] techCRC mismatch, local = %d, remote = %d\n",
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] techCRC mismatch, local = %d, remote = %d, networkMessageSynchNetworkGameData.getTech() = [%s]\n",
|
||||||
__FILE__,__FUNCTION__,techCRC,networkMessageSynchNetworkGameData.getTechCRC());
|
__FILE__,__FUNCTION__,techCRC,networkMessageSynchNetworkGameData.getTechCRC(),networkMessageSynchNetworkGameData.getTech().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
//map
|
//map
|
||||||
@@ -228,8 +228,8 @@ void ClientInterface::updateLobby()
|
|||||||
|
|
||||||
if(this->getNetworkGameDataSynchCheckOkMap() == false)
|
if(this->getNetworkGameDataSynchCheckOkMap() == false)
|
||||||
{
|
{
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] mapCRC mismatch, local = %d, remote = %d\n",
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] mapCRC mismatch, local = %d, remote = %d, file = [%s]\n",
|
||||||
__FILE__,__FUNCTION__,mapCRC,networkMessageSynchNetworkGameData.getMapCRC());
|
__FILE__,__FUNCTION__,mapCRC,networkMessageSynchNetworkGameData.getMapCRC(),file.c_str());
|
||||||
}
|
}
|
||||||
NetworkMessageSynchNetworkGameDataStatus sendNetworkMessageSynchNetworkGameDataStatus(mapCRC,tilesetCRC,techCRC);
|
NetworkMessageSynchNetworkGameDataStatus sendNetworkMessageSynchNetworkGameDataStatus(mapCRC,tilesetCRC,techCRC);
|
||||||
sendMessage(&sendNetworkMessageSynchNetworkGameDataStatus);
|
sendMessage(&sendNetworkMessageSynchNetworkGameDataStatus);
|
||||||
@@ -573,16 +573,22 @@ void ClientInterface::waitUntilReady(Checksum* checksum)
|
|||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d\n",__FILE__,__FUNCTION__,__LINE__);
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
string sErr = "Checksum error, you don't have the same data as the server";
|
string sErr = "Checksum error, you don't have the same data as the server";
|
||||||
//throw runtime_error("Checksum error, you don't have the same data as the server");
|
|
||||||
sendTextMessage(sErr,-1);
|
sendTextMessage(sErr,-1);
|
||||||
|
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d\n",__FILE__,__FUNCTION__,__LINE__);
|
string sErr1 = "Client Checksum: " + intToStr(checksum->getSum());
|
||||||
|
sendTextMessage(sErr1,-1);
|
||||||
|
|
||||||
|
string sErr2 = "Server Checksum: " + intToStr(networkMessageReady.getChecksum());
|
||||||
|
sendTextMessage(sErr2,-1);
|
||||||
|
|
||||||
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d %s %s %s\n",__FILE__,__FUNCTION__,__LINE__,sErr.c_str(),sErr1.c_str(),sErr2.c_str());
|
||||||
|
|
||||||
if(Config::getInstance().getBool("NetworkConsistencyChecks")) {
|
if(Config::getInstance().getBool("NetworkConsistencyChecks")) {
|
||||||
// error message and disconnect only if checked
|
// error message and disconnect only if checked
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d\n",__FILE__,__FUNCTION__,__LINE__);
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
DisplayErrorMessage(sErr);
|
string niceError = sErr + string("\n") + sErr1 + string("\n") + sErr2;
|
||||||
|
DisplayErrorMessage(niceError);
|
||||||
|
|
||||||
quit= true;
|
quit= true;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user