Index: client/Client/main.cpp
===================================================================
--- client/Client/main.cpp	(revision 8271c78c085cf1aced499458d814982503a48182)
+++ client/Client/main.cpp	(revision c044a36f579106497263bfffc4f0c15ddef7a1d7)
@@ -112,4 +112,5 @@
 
 MessageProcessor msgProcessor;
+ofstream outputLog;
 
 int main(int argc, char **argv)
@@ -127,5 +128,4 @@
    bool fullscreen = false;
    debugging = false;
-   ofstream outputLog;
 
    scoreBlue = 0;
@@ -322,5 +322,5 @@
                   msgTo.type = MSG_TYPE_PICKUP_FLAG;
                   memcpy(msgTo.buffer, &curPlayerId, 4);
-                  msgProcessor.sendMessage(&msgTo, sock, &server);
+                  msgProcessor.sendMessage(&msgTo, sock, &server, &outputLog);
                }
                break;
@@ -347,5 +347,5 @@
                         msgTo.type = MSG_TYPE_DROP_FLAG;
                         memcpy(msgTo.buffer, &curPlayerId, 4);
-                        msgProcessor.sendMessage(&msgTo, sock, &server);
+                        msgProcessor.sendMessage(&msgTo, sock, &server, &outputLog);
                      }
                   }
@@ -370,5 +370,5 @@
                   memcpy(msgTo.buffer+8, &pos.y, 4);
 
-                  msgProcessor.sendMessage(&msgTo, sock, &server);
+                  msgProcessor.sendMessage(&msgTo, sock, &server, &outputLog);
                }
                else
@@ -397,5 +397,5 @@
                         memcpy(msgTo.buffer+4, &target->id, 4);
 
-                        msgProcessor.sendMessage(&msgTo, sock, &server);
+                        msgProcessor.sendMessage(&msgTo, sock, &server, &outputLog);
                      }
                   }
@@ -404,5 +404,5 @@
       }
 
-      if (msgProcessor.receiveMessage(&msgFrom, sock, &from) >= 0)
+      if (msgProcessor.receiveMessage(&msgFrom, sock, &from, &outputLog) >= 0)
          processMessage(msgFrom, state, chatConsole, gameMap, mapPlayers, mapProjectiles, curPlayerId, scoreBlue, scoreRed);
 
@@ -411,6 +411,6 @@
          redraw = false;
 
-         msgProcessor.resendUnackedMessages(sock);
-         //msgProcessor.cleanAckedMessages();
+         msgProcessor.resendUnackedMessages(sock, &outputLog);
+         //msgProcessor.cleanAckedMessages(&outputLog);
 
          if (debugging && wndCurrent == wndMain)
@@ -958,5 +958,5 @@
    memcpy(msgTo.buffer+username.size()+password.size()+2, &playerClass, 4);
 
-   msgProcessor.sendMessage(&msgTo, sock, &server);
+   msgProcessor.sendMessage(&msgTo, sock, &server, &outputLog);
 }
 
@@ -975,5 +975,5 @@
    strcpy(msgTo.buffer+username.size()+1, strPassword.c_str());
 
-   msgProcessor.sendMessage(&msgTo, sock, &server);
+   msgProcessor.sendMessage(&msgTo, sock, &server, &outputLog);
 
    state = STATE_LOGIN;
@@ -989,5 +989,5 @@
    strcpy(msgTo.buffer, username.c_str());
 
-   msgProcessor.sendMessage(&msgTo, sock, &server);
+   msgProcessor.sendMessage(&msgTo, sock, &server, &outputLog);
 }
 
@@ -1007,5 +1007,5 @@
    strcpy(msgTo.buffer, msg.c_str());
 
-   msgProcessor.sendMessage(&msgTo, sock, &server);
+   msgProcessor.sendMessage(&msgTo, sock, &server, &outputLog);
 }
 
@@ -1032,13 +1032,12 @@
 void drawMessageStatus(ALLEGRO_FONT* font)
 {
-   int clientMsgOffset = 0;
-   int serverMsgOffset = 650;
-
-   al_draw_text(font, al_map_rgb(0, 255, 255), 5, 43, ALLEGRO_ALIGN_LEFT, "ID");
-   al_draw_text(font, al_map_rgb(0, 255, 255), 25, 43, ALLEGRO_ALIGN_LEFT, "Type");
-   al_draw_text(font, al_map_rgb(0, 255, 255), 245, 43, ALLEGRO_ALIGN_LEFT, "Acked?");
-
-   al_draw_text(font, al_map_rgb(0, 255, 255), 5+serverMsgOffset, 43, ALLEGRO_ALIGN_LEFT, "ID");
-   al_draw_text(font, al_map_rgb(0, 255, 255), 25+serverMsgOffset, 43, ALLEGRO_ALIGN_LEFT, "Type");
+   int clientMsgOffset = 5;
+   int serverMsgOffset = 950;
+
+   al_draw_text(font, al_map_rgb(0, 255, 255), 0+clientMsgOffset, 43, ALLEGRO_ALIGN_LEFT, "ID");
+   al_draw_text(font, al_map_rgb(0, 255, 255), 20+clientMsgOffset, 43, ALLEGRO_ALIGN_LEFT, "Type");
+   al_draw_text(font, al_map_rgb(0, 255, 255), 240+clientMsgOffset, 43, ALLEGRO_ALIGN_LEFT, "Acked?");
+
+   al_draw_text(font, al_map_rgb(0, 255, 255), serverMsgOffset, 43, ALLEGRO_ALIGN_LEFT, "ID");
 
    map<unsigned int, map<unsigned long, MessageContainer> >& sentMessages = msgProcessor.getSentMessages();
@@ -1066,7 +1065,7 @@
          ossAcked << boolalpha << acked;
 
-         al_draw_text(font, al_map_rgb(0, 255, 0), 5, 60+15*msgCount, ALLEGRO_ALIGN_LEFT, ossId.str().c_str());
-         al_draw_text(font, al_map_rgb(0, 255, 0), 25, 60+15*msgCount, ALLEGRO_ALIGN_LEFT, typeStr.c_str());
-         al_draw_text(font, al_map_rgb(0, 255, 0), 245, 60+15*msgCount, ALLEGRO_ALIGN_LEFT, ossAcked.str().c_str());
+         al_draw_text(font, al_map_rgb(0, 255, 0), clientMsgOffset, 60+15*msgCount, ALLEGRO_ALIGN_LEFT, ossId.str().c_str());
+         al_draw_text(font, al_map_rgb(0, 255, 0), 20+clientMsgOffset, 60+15*msgCount, ALLEGRO_ALIGN_LEFT, typeStr.c_str());
+         al_draw_text(font, al_map_rgb(0, 255, 0), 240+clientMsgOffset, 60+15*msgCount, ALLEGRO_ALIGN_LEFT, ossAcked.str().c_str());
 
          msgCount++;
@@ -1074,18 +1073,17 @@
    }
 
-   map<unsigned int, MessageContainer>& ackedMessages = msgProcessor.getAckedMessages();
-   map<unsigned int, MessageContainer>::iterator it3;
-
-   msgCount = 0;
-   for (it3 = ackedMessages.begin(); it3 != ackedMessages.end(); it3++) {
-      ossId.str("");;
-      ossId << it3->first;
-
-      string typeStr = MessageContainer::getMsgTypeString(it3->second.getMessage()->type);
-
-      al_draw_text(font, al_map_rgb(255, 0, 0), 5+serverMsgOffset, 60+15*msgCount, ALLEGRO_ALIGN_LEFT, ossId.str().c_str());
-      al_draw_text(font, al_map_rgb(255, 0, 0), 25+serverMsgOffset, 60+15*msgCount, ALLEGRO_ALIGN_LEFT, typeStr.c_str());
-
-      msgCount++;
-   }
-}
+   if (msgProcessor.getAckedMessages().size() > 0) {
+      map<unsigned int, unsigned long long> ackedMessages = msgProcessor.getAckedMessages()[0];
+      map<unsigned int, unsigned long long>::iterator it3;
+
+      msgCount = 0;
+      for (it3 = ackedMessages.begin(); it3 != ackedMessages.end(); it3++) {
+         ossId.str("");;
+         ossId << it3->first;
+
+         al_draw_text(font, al_map_rgb(255, 0, 0), 25+serverMsgOffset, 60+15*msgCount, ALLEGRO_ALIGN_LEFT, ossId.str().c_str());
+
+         msgCount++;
+      }
+   }
+}
