Index: client/Client/main.cpp
===================================================================
--- client/Client/main.cpp	(revision 8aed9c0de5154bb4504eb5afd9ebab22ac0a4912)
+++ client/Client/main.cpp	(revision eb2ad4f8d147f3e19dbe991e6f96f7c0561d5ba8)
@@ -57,5 +57,5 @@
 void initWinSock();
 void shutdownWinSock();
-void processMessage(NETWORK_MSG &msg, int &state, chat &chatConsole, WorldMap *gameMap, map<unsigned int, Player*>& mapPlayers,
+void processMessage(NETWORK_MSG &msg, int &state, chat &chatConsole, map<unsigned int, Player*>& mapPlayers,
                     map<unsigned int, Projectile>& mapProjectiles, unsigned int& curPlayerId);
 int getRefreshRate(int width, int height);
@@ -205,8 +205,4 @@
       return -1;
    }
-
-   WorldMap* gameMap = WorldMap::loadMapFromFile("../../data/map.txt");
-
-   cout << "Loaded map" << endl;
 
    debugConsole.addLine("Debug console:");
@@ -452,5 +448,5 @@
 
       if (msgProcessor.receiveMessage(&msgFrom, &from) >= 0)
-         processMessage(msgFrom, state, chatConsole, gameMap, mapPlayers, mapProjectiles, curPlayerId);
+         processMessage(msgFrom, state, chatConsole, mapPlayers, mapProjectiles, curPlayerId);
 
       if (redraw)
@@ -595,6 +591,5 @@
    delete wndGameSummary;
 
-   delete gameMap;
-
+   // game should be deleted when the player leaves a gamw
    if (game != NULL)
       delete game;
@@ -644,5 +639,5 @@
 }
 
-void processMessage(NETWORK_MSG &msg, int &state, chat &chatConsole, WorldMap *gameMap, map<unsigned int, Player*>& mapPlayers,
+void processMessage(NETWORK_MSG &msg, int &state, chat &chatConsole, map<unsigned int, Player*>& mapPlayers,
                     map<unsigned int, Projectile>& mapProjectiles, unsigned int& curPlayerId)
 {
@@ -780,29 +775,4 @@
             {
                chatConsole.addLine(response);
-
-               break;
-            }
-            case MSG_TYPE_OBJECT:
-            {
-               cout << "Received OBJECT message" << endl;
-
-               WorldMap::Object o(0, WorldMap::OBJECT_NONE, 0, 0);
-               o.deserialize(msg.buffer);
-               cout << "object id: " << o.id << endl;
-               gameMap->updateObject(o.id, o.type, o.pos.x, o.pos.y);
-
-               break;
-            }
-            case MSG_TYPE_REMOVE_OBJECT:
-            {
-               cout << "Received REMOVE_OBJECT message!" << endl;
-
-               int id;
-               memcpy(&id, msg.buffer, 4);
-
-               cout << "Removing object with id " << id << endl;
-
-               if (!gameMap->removeObject(id))
-                  cout << "Did not remove the object" << endl;
 
                break;
