diff --git a/source/glest_game/game/chat_manager.cpp b/source/glest_game/game/chat_manager.cpp index 818c49858..e43b3e3c5 100644 --- a/source/glest_game/game/chat_manager.cpp +++ b/source/glest_game/game/chat_manager.cpp @@ -140,7 +140,7 @@ void ChatManager::updateNetwork() { string sender; Config &config= Config::getInstance(); - SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] gameNetworkInterface->getChatText() [%s]\n",__FILE__,__FUNCTION__,__LINE__,gameNetworkInterface->getChatText().c_str()); + //SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] gameNetworkInterface->getChatText() [%s]\n",__FILE__,__FUNCTION__,__LINE__,gameNetworkInterface->getChatText().c_str()); if(gameNetworkInterface->getChatText().empty() == false) { int teamIndex= gameNetworkInterface->getChatTeamIndex(); diff --git a/source/glest_game/network/network_message.cpp b/source/glest_game/network/network_message.cpp index 85cb57178..80dc7c509 100644 --- a/source/glest_game/network/network_message.cpp +++ b/source/glest_game/network/network_message.cpp @@ -243,7 +243,7 @@ bool NetworkMessageCommandList::addCommand(const NetworkCommand* networkCommand) bool NetworkMessageCommandList::receive(Socket* socket){ // _peek_ type, commandCount & frame num first. if (!NetworkMessage::peek(socket, &data, commandListHeaderSize)) { - SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s %d] NetworkMessage::peek failed!\n",__FILE__,__FUNCTION__,__LINE__); + SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s %d] WARNING!!! NetworkMessage::peek failed!\n",__FILE__,__FUNCTION__,__LINE__); return false; } @@ -253,7 +253,7 @@ bool NetworkMessageCommandList::receive(Socket* socket){ // read header + data.commandCount commands. int totalMsgSize = commandListHeaderSize + sizeof(NetworkCommand) * data.commandCount; if (socket->getDataToRead() < totalMsgSize) { - SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s %d] Insufficient data to read entire command list [need %d bytes, only %d available].\n", + SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s %d] WARNING!!! Insufficient data to read entire command list [need %d bytes, only %d available].\n", __FILE__,__FUNCTION__,__LINE__, totalMsgSize, socket->getDataToRead()); return false; } @@ -262,9 +262,8 @@ bool NetworkMessageCommandList::receive(Socket* socket){ for(int idx = 0 ; idx < data.commandCount; ++idx) { const NetworkCommand &cmd = data.commands[idx]; - SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s %d] index = %d, networkCommandType = %d, unitId = %d, commandTypeId = %d, positionX = %d, positionY = %d, unitTypeId = %d, targetId = %d\n", - __FILE__,__FUNCTION__,__LINE__,idx, cmd.getNetworkCommandType(),cmd.getUnitId(), cmd.getCommandTypeId(), - cmd.getPosition().x,cmd.getPosition().y, cmd.getUnitTypeId(), cmd.getTargetId()); + SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s %d] index = %d, received networkCommand [%s]\n", + __FILE__,__FUNCTION__,__LINE__,idx, cmd.toString().c_str()); } } return result; @@ -282,9 +281,8 @@ void NetworkMessageCommandList::send(Socket* socket) const{ for(int idx = 0 ; idx < data.commandCount; ++idx) { const NetworkCommand &cmd = data.commands[idx]; - SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s %d] index = %d, networkCommandType = %d, unitId = %d, commandTypeId = %d, positionX = %d, positionY = %d, unitTypeId = %d, targetId = %d\n", - __FILE__,__FUNCTION__,__LINE__,idx, cmd.getNetworkCommandType(),cmd.getUnitId(), cmd.getCommandTypeId(), - cmd.getPosition().x,cmd.getPosition().y, cmd.getUnitTypeId(), cmd.getTargetId()); + SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s %d] index = %d, sent networkCommand [%s]\n", + __FILE__,__FUNCTION__,__LINE__,idx, cmd.toString().c_str()); } } } diff --git a/source/glest_game/network/server_interface.cpp b/source/glest_game/network/server_interface.cpp index 9631dc48a..eb5dc9ddc 100644 --- a/source/glest_game/network/server_interface.cpp +++ b/source/glest_game/network/server_interface.cpp @@ -185,7 +185,7 @@ void ServerInterface::updateSlot(ConnectionSlotEvent *event) { } void ServerInterface::update() { - 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__); std::map socketTriggeredList; //update all slots @@ -197,16 +197,16 @@ void ServerInterface::update() { } } - 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__); //chatText.clear(); //chatSender.clear(); //chatTeamIndex= -1; - 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__); if(gameHasBeenInitiated == false || socketTriggeredList.size() > 0) { - if(gameHasBeenInitiated) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] socketTriggeredList.size() = %d\n",__FILE__,__FUNCTION__,socketTriggeredList.size()); + //if(gameHasBeenInitiated) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] socketTriggeredList.size() = %d\n",__FILE__,__FUNCTION__,socketTriggeredList.size()); std::map eventList; bool hasData = Socket::hasDataToRead(socketTriggeredList); @@ -390,7 +390,7 @@ void ServerInterface::update() { } } - 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__); } void ServerInterface::updateKeyframe(int frameCount){ @@ -689,7 +689,7 @@ void ServerInterface::broadcastGameSetup(const GameSettings* gameSettings) { void ServerInterface::broadcastMessage(const NetworkMessage* networkMessage, int excludeSlot){ //serverSynchAccessor.p(); - 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__); try { for(int i= 0; i