mirror of
https://github.com/glest/glest-source.git
synced 2025-08-23 08:22:50 +02:00
removed some debug output to make reading logs easier
This commit is contained in:
@@ -140,7 +140,7 @@ void ChatManager::updateNetwork() {
|
|||||||
string sender;
|
string sender;
|
||||||
Config &config= Config::getInstance();
|
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) {
|
if(gameNetworkInterface->getChatText().empty() == false) {
|
||||||
int teamIndex= gameNetworkInterface->getChatTeamIndex();
|
int teamIndex= gameNetworkInterface->getChatTeamIndex();
|
||||||
|
@@ -243,7 +243,7 @@ bool NetworkMessageCommandList::addCommand(const NetworkCommand* networkCommand)
|
|||||||
bool NetworkMessageCommandList::receive(Socket* socket){
|
bool NetworkMessageCommandList::receive(Socket* socket){
|
||||||
// _peek_ type, commandCount & frame num first.
|
// _peek_ type, commandCount & frame num first.
|
||||||
if (!NetworkMessage::peek(socket, &data, commandListHeaderSize)) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@ bool NetworkMessageCommandList::receive(Socket* socket){
|
|||||||
// read header + data.commandCount commands.
|
// read header + data.commandCount commands.
|
||||||
int totalMsgSize = commandListHeaderSize + sizeof(NetworkCommand) * data.commandCount;
|
int totalMsgSize = commandListHeaderSize + sizeof(NetworkCommand) * data.commandCount;
|
||||||
if (socket->getDataToRead() < totalMsgSize) {
|
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());
|
__FILE__,__FUNCTION__,__LINE__, totalMsgSize, socket->getDataToRead());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -262,9 +262,8 @@ bool NetworkMessageCommandList::receive(Socket* socket){
|
|||||||
for(int idx = 0 ; idx < data.commandCount; ++idx) {
|
for(int idx = 0 ; idx < data.commandCount; ++idx) {
|
||||||
const NetworkCommand &cmd = data.commands[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",
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s %d] index = %d, received networkCommand [%s]\n",
|
||||||
__FILE__,__FUNCTION__,__LINE__,idx, cmd.getNetworkCommandType(),cmd.getUnitId(), cmd.getCommandTypeId(),
|
__FILE__,__FUNCTION__,__LINE__,idx, cmd.toString().c_str());
|
||||||
cmd.getPosition().x,cmd.getPosition().y, cmd.getUnitTypeId(), cmd.getTargetId());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@@ -282,9 +281,8 @@ void NetworkMessageCommandList::send(Socket* socket) const{
|
|||||||
for(int idx = 0 ; idx < data.commandCount; ++idx) {
|
for(int idx = 0 ; idx < data.commandCount; ++idx) {
|
||||||
const NetworkCommand &cmd = data.commands[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",
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s %d] index = %d, sent networkCommand [%s]\n",
|
||||||
__FILE__,__FUNCTION__,__LINE__,idx, cmd.getNetworkCommandType(),cmd.getUnitId(), cmd.getCommandTypeId(),
|
__FILE__,__FUNCTION__,__LINE__,idx, cmd.toString().c_str());
|
||||||
cmd.getPosition().x,cmd.getPosition().y, cmd.getUnitTypeId(), cmd.getTargetId());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -185,7 +185,7 @@ void ServerInterface::updateSlot(ConnectionSlotEvent *event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ServerInterface::update() {
|
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;
|
std::map<PLATFORM_SOCKET,bool> socketTriggeredList;
|
||||||
//update all slots
|
//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();
|
//chatText.clear();
|
||||||
//chatSender.clear();
|
//chatSender.clear();
|
||||||
//chatTeamIndex= -1;
|
//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 == 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;
|
std::map<int,ConnectionSlotEvent> eventList;
|
||||||
bool hasData = Socket::hasDataToRead(socketTriggeredList);
|
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){
|
void ServerInterface::updateKeyframe(int frameCount){
|
||||||
@@ -689,7 +689,7 @@ void ServerInterface::broadcastGameSetup(const GameSettings* gameSettings) {
|
|||||||
|
|
||||||
void ServerInterface::broadcastMessage(const NetworkMessage* networkMessage, int excludeSlot){
|
void ServerInterface::broadcastMessage(const NetworkMessage* networkMessage, int excludeSlot){
|
||||||
//serverSynchAccessor.p();
|
//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 {
|
try {
|
||||||
for(int i= 0; i<GameConstants::maxPlayers; ++i) {
|
for(int i= 0; i<GameConstants::maxPlayers; ++i) {
|
||||||
@@ -720,7 +720,7 @@ void ServerInterface::broadcastMessage(const NetworkMessage* networkMessage, int
|
|||||||
}
|
}
|
||||||
//serverSynchAccessor.v();
|
//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){
|
void ServerInterface::broadcastMessageToConnectedClients(const NetworkMessage* networkMessage, int excludeSlot){
|
||||||
|
Reference in New Issue
Block a user