Turned off pointless network warnings

This commit is contained in:
mathusummut
2019-01-26 15:42:40 +01:00
parent b73f67bf2a
commit f591544528
5 changed files with 20 additions and 25 deletions

View File

@@ -670,15 +670,13 @@ namespace Game {
networkCommand->getUnitId());
SystemFlags::OutputDebug(SystemFlags::debugError, "%s\n", szMsg);
SystemFlags::OutputDebug(SystemFlags::debugSystem, "%s\n", szMsg);
GameNetworkInterface *
/*GameNetworkInterface *
gameNetworkInterface =
NetworkManager::getInstance().getGameNetworkInterface();
if (gameNetworkInterface != NULL) {
gameNetworkInterface->
sendTextMessage(szMsg, -1, true, "");
}
/*throw
game_runtime_error(szBuf);*/
}*/
return std::pair<CommandResult, string>(crFailUndefined, "");
}
}
@@ -1611,14 +1609,12 @@ namespace Game {
networkCommand->getUnitId());
SystemFlags::OutputDebug(SystemFlags::debugError, "%s\n", szMsg);
SystemFlags::OutputDebug(SystemFlags::debugSystem, "%s\n", szMsg);
GameNetworkInterface *
/*GameNetworkInterface *
gameNetworkInterface =
NetworkManager::getInstance().getGameNetworkInterface();
if (gameNetworkInterface != NULL)
gameNetworkInterface->sendTextMessage(szMsg, -1, true, "");
gameNetworkInterface->sendTextMessage(szMsg, -1, true, "");*/
/*throw
game_runtime_error(szBuf);*/
return command;
}
@@ -1642,11 +1638,11 @@ namespace Game {
//world->DumpWorldToLog();
// Broadcast the error if player is still connected and print locally.
GameNetworkInterface *
/*GameNetworkInterface *
gameNetworkInterface =
NetworkManager::getInstance().getGameNetworkInterface();
if (gameNetworkInterface != NULL)
gameNetworkInterface->sendTextMessage(szMsg, -1, true, "");
gameNetworkInterface->sendTextMessage(szMsg, -1, true, "");*/
return command;
}
@@ -1685,11 +1681,11 @@ namespace Game {
SystemFlags::OutputDebug(SystemFlags::debugError, "%s\n", szMsg);
//world->DumpWorldToLog();
GameNetworkInterface *
/*GameNetworkInterface *
gameNetworkInterface =
NetworkManager::getInstance().getGameNetworkInterface();
if (gameNetworkInterface != NULL)
gameNetworkInterface->sendTextMessage(szMsg, -1, true, "");
gameNetworkInterface->sendTextMessage(szMsg, -1, true, "");*/
return command;
}

View File

@@ -121,9 +121,12 @@ void handleUnexpectedError(const char* message) {
Game::Game* currentGame = Game::World::getCurrentGame();
if (currentGame != NULL && currentGame->isFlagType1BitEnabled(Game::FlagTypes1::ft1_allow_shared_team_resources))
return;
Game::GameNetworkInterface* gameNetworkInterface = Game::NetworkManager::getInstance().getGameNetworkInterface();
printf("%s\n", message);
SystemFlags::OutputDebug(SystemFlags::debugSystem, "%s\n", message);
SystemFlags::OutputDebug(SystemFlags::debugError, "%s\n", message);
/*Game::GameNetworkInterface* gameNetworkInterface = Game::NetworkManager::getInstance().getGameNetworkInterface();
if (gameNetworkInterface != NULL)
gameNetworkInterface->sendTextMessage(message, -1, true, "");
gameNetworkInterface->sendTextMessage(message, -1, true, "");*/
}
namespace Game {

View File

@@ -487,14 +487,14 @@ namespace Game {
lastNetworkCommandListSendTime = time(NULL);
}
// Possible cause of out of synch since we have more commands that need
// Possible cause of out of sync since we have more commands that need
// to be sent in this frame
if (requestedCommands.empty() == false) {
if (SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork, "In [%s::%s Line: %d] WARNING / ERROR, requestedCommands.size() = %d\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, requestedCommands.size());
string sMsg = "may go out of synch: client requestedCommands.size() = " + intToStr(requestedCommands.size());
sendTextMessage(sMsg, -1, true, "");
sleep(0);
printf("May go out of synch: client requestedCommands.size() = %zd\n", requestedCommands.size());
/*sendTextMessage(sMsg, -1, true, "");
sleep(0);*/
}
} catch (const game_runtime_error &ex) {
SystemFlags::OutputDebug(SystemFlags::debugNetwork, "In [%s::%s Line: %d] Error [%s]\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, ex.what());

View File

@@ -1680,8 +1680,7 @@ namespace Game {
if (SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork, "In [%s::%s Line: %d] WARNING / ERROR, requestedCommands.size() = %d\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, requestedCommands.size());
SystemFlags::OutputDebug(SystemFlags::debugError, "In [%s::%s Line: %d] WARNING / ERROR, requestedCommands.size() = %d\n", extractFileFromDirectoryPath(__FILE__).c_str(), __FUNCTION__, __LINE__, requestedCommands.size());
string sMsg = "may go out of synch: server requestedCommands.size() = " + intToStr(requestedCommands.size());
sendTextMessage(sMsg, -1, true, "");
printf("May go out of sync: server requestedCommands.size() = %zd\n", requestedCommands.size());
}
// broadcast commands

View File

@@ -2245,12 +2245,9 @@ namespace Shared {
char szMsg[8096];
snprintf(szMsg, 8096, "A value in memory has changed unexpectedly (expected %d, found %d). Game out of sync, try leaving and rejoining",
expectedValue, actualValue);
printf("%s\n", szMsg);
SystemFlags::OutputDebug(SystemFlags::debugSystem, "%s\n", szMsg);
SystemFlags::OutputDebug(SystemFlags::debugError, "%s\n", szMsg);
/*void(*handler)(const char*) = unexpected_handler;
void(*handler)(const char*) = unexpected_handler;
if (handler != NULL)
handler(szMsg);*/
handler(szMsg);
}
void ValueCheckerVault::addItemToVault(const void *ptr, int value) {