removed some debug output to make reading logs easier
This commit is contained in:
parent
ffef6e4098
commit
e4f885ecf3
|
@ -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();
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<PLATFORM_SOCKET,bool> 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<int,ConnectionSlotEvent> 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<GameConstants::maxPlayers; ++i) {
|
||||
|
@ -720,7 +720,7 @@ void ServerInterface::broadcastMessage(const NetworkMessage* networkMessage, int
|
|||
}
|
||||
//serverSynchAccessor.v();
|
||||
|
||||
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::broadcastMessageToConnectedClients(const NetworkMessage* networkMessage, int excludeSlot){
|
||||
|
|
Loading…
Reference in New Issue
Block a user