Index: client/Client/GameRender.cpp
===================================================================
--- client/Client/GameRender.cpp	(revision 6319311052eaa6c0398a2f630339cacad808c9af)
+++ client/Client/GameRender.cpp	(revision e6c26b8e97335601a55a8fba77c10c05b3b08c98)
@@ -52,63 +52,4 @@
          }
       }
-   }
-}
-
-void GameRender::drawPlayers(map<unsigned int, Player>& mapPlayers, ALLEGRO_FONT* font, unsigned int curPlayerId)
-{
-   map<unsigned int, Player>::iterator it;
-
-   Player* p;
-   POSITION pos;
-   ALLEGRO_COLOR color;
-
-   for(it = mapPlayers.begin(); it != mapPlayers.end(); it++)
-   {
-      p = &it->second;
-
-      if (p->isDead)
-         continue;
-
-      pos = mapToScreen(p->pos.toInt());
-
-      if (p->id == curPlayerId)
-         al_draw_filled_circle(pos.x, pos.y, 14, al_map_rgb(0, 0, 0));
-      
-      if (p->team == 0)
-         color = al_map_rgb(0, 0, 255);
-      else if (p->team == 1)
-         color = al_map_rgb(255, 0, 0);
-      
-      al_draw_filled_circle(pos.x, pos.y, 12, color);
-
-      // draw player class
-      int fontHeight = al_get_font_line_height(font);
-
-      string strClass;
-      switch (p->playerClass) {
-      case Player::CLASS_WARRIOR:
-         strClass = "W";
-         break;
-      case Player::CLASS_RANGER:
-         strClass = "R";
-         break;
-      case Player::CLASS_NONE:
-         strClass = "";
-         break;
-      default:
-         strClass = "";
-         break;
-      }
-      al_draw_text(font, al_map_rgb(0, 0, 0), pos.x, pos.y-fontHeight/2, ALLEGRO_ALIGN_CENTRE, strClass.c_str());
-
-      // draw player health
-      al_draw_filled_rectangle(pos.x-12, pos.y-24, pos.x+12, pos.y-16, al_map_rgb(0, 0, 0));
-      if (p->maxHealth != 0)
-         al_draw_filled_rectangle(pos.x-11, pos.y-23, pos.x-11+(22*p->health)/p->maxHealth, pos.y-17, al_map_rgb(255, 0, 0));
-
-      if (p->hasBlueFlag)
-         al_draw_filled_rectangle(pos.x+4, pos.y-18, pos.x+18, pos.y-4, al_map_rgb(0, 0, 255));
-      else if (p->hasRedFlag)
-         al_draw_filled_rectangle(pos.x+4, pos.y-18, pos.x+18, pos.y-4, al_map_rgb(255, 0, 0));
    }
 }
Index: client/Client/GameRender.h
===================================================================
--- client/Client/GameRender.h	(revision 6319311052eaa6c0398a2f630339cacad808c9af)
+++ client/Client/GameRender.h	(revision e6c26b8e97335601a55a8fba77c10c05b3b08c98)
@@ -24,5 +24,4 @@
 public:
    static void drawMap(WorldMap* gameMap);
-   static void drawPlayers(map<unsigned int, Player>& mapPlayers, ALLEGRO_FONT* font, unsigned int curPlayerId);
    static void drawPlayers(map<unsigned int, Player*>& mapPlayers, ALLEGRO_FONT* font, unsigned int curPlayerId);
 };
Index: client/Client/main.cpp
===================================================================
--- client/Client/main.cpp	(revision 6319311052eaa6c0398a2f630339cacad808c9af)
+++ client/Client/main.cpp	(revision e6c26b8e97335601a55a8fba77c10c05b3b08c98)
@@ -54,5 +54,5 @@
 void initWinSock();
 void shutdownWinSock();
-void processMessage(NETWORK_MSG &msg, int &state, chat &chatConsole, WorldMap *gameMap, map<unsigned int, Player>& mapPlayers, map<unsigned int, Projectile>& mapProjectiles, unsigned int& curPlayerId, int &scoreBlue, int &scoreRed);
+void processMessage(NETWORK_MSG &msg, int &state, chat &chatConsole, WorldMap *gameMap, map<unsigned int, Player*>& mapPlayers, map<unsigned int, Projectile>& mapProjectiles, unsigned int& curPlayerId, int &scoreBlue, int &scoreRed);
 int getRefreshRate(int width, int height);
 void drawMessageStatus(ALLEGRO_FONT* font);
@@ -133,5 +133,5 @@
    ALLEGRO_TIMER *timer = NULL;
    bool key[4] = { false, false, false, false };
-   map<unsigned int, Player> mapPlayers;
+   map<unsigned int, Player*> mapPlayers;
    map<unsigned int, Projectile> mapProjectiles;
    unsigned int curPlayerId = -1;
@@ -362,10 +362,10 @@
                if (state == STATE_GAME) {
                   // find the current player in the player list
-                  map<unsigned int, Player>::iterator it;
+                  map<unsigned int, Player*>::iterator it;
                   Player* p = NULL;
                   for(it = mapPlayers.begin(); it != mapPlayers.end(); it++)
                   {
-                     if (it->second.id == curPlayerId)
-                        p = &it->second;
+                     if (it->second->id == curPlayerId)
+                        p = it->second;
                   }
 
@@ -416,5 +416,5 @@
                   cout << "Invalid point: User did not click on the map" << endl;
             }else if (ev.mouse.button == 2) {   // right click
-                  map<unsigned int, Player>::iterator it;
+                  map<unsigned int, Player*>::iterator it;
 
                   cout << "Detected a right-click" << endl;
@@ -423,6 +423,6 @@
                   for(it = mapPlayers.begin(); it != mapPlayers.end(); it++)
                   {
-                     if (it->second.id == curPlayerId)
-                        curPlayer = &it->second;
+                     if (it->second->id == curPlayerId)
+                        curPlayer = it->second;
                   }
 
@@ -432,5 +432,5 @@
                      // need to check if the right-click was actually on this player
                      // right now, this code will target all players other than the current one
-                     target = &it->second;
+                     target = it->second;
                      if (target->id != curPlayerId && target->team != curPlayer->team)
                      {
@@ -502,13 +502,13 @@
 
             // update players
-            map<unsigned int, Player>::iterator it;
+            map<unsigned int, Player*>::iterator it;
             for (it = mapPlayers.begin(); it != mapPlayers.end(); it++)
             {
-               it->second.updateTarget(mapPlayers);
+               it->second->updateTarget(mapPlayers);
             }
 
             for (it = mapPlayers.begin(); it != mapPlayers.end(); it++)
             {
-               it->second.move(gameMap);   // ignore return value
+               it->second->move(gameMap);    // ignore return value
             }
 
@@ -528,5 +528,5 @@
                Projectile proj = it2->second;
 
-               FLOAT_POSITION target = mapPlayers[proj.target].pos;
+               FLOAT_POSITION target = mapPlayers[proj.target]->pos;
                float angle =  atan2(target.y-proj.pos.toFloat().y, target.x-proj.pos.toFloat().x);
 
@@ -572,4 +572,10 @@
       delete game;
 
+   map<unsigned int, Player*>::iterator it;
+
+   for (it = mapPlayers.begin(); it != mapPlayers.end(); it++) {
+      delete it->second;
+   }
+
    al_destroy_event_queue(event_queue);
    al_destroy_display(display);
@@ -617,5 +623,5 @@
 }
 
-void processMessage(NETWORK_MSG &msg, int &state, chat &chatConsole, WorldMap *gameMap, map<unsigned int, Player>& mapPlayers, map<unsigned int, Projectile>& mapProjectiles, unsigned int& curPlayerId, int &scoreBlue, int &scoreRed)
+void processMessage(NETWORK_MSG &msg, int &state, chat &chatConsole, WorldMap *gameMap, map<unsigned int, Player*>& mapPlayers, map<unsigned int, Projectile>& mapProjectiles, unsigned int& curPlayerId, int &scoreBlue, int &scoreRed)
 {
    string response = string(msg.buffer);
@@ -671,5 +677,8 @@
                   Player p("", "");
                   p.deserialize(msg.buffer);
-                  mapPlayers[p.id] = p;
+
+                  if (mapPlayers.find(p.id) != mapPlayers.end())
+                     delete mapPlayers[p.id];
+                  mapPlayers[p.id] = new Player(p);
                   curPlayerId = p.id;
 
@@ -708,5 +717,7 @@
                   p.isDead = false;
 
-               mapPlayers[p.id] = p;
+               if (mapPlayers.find(p.id) != mapPlayers.end())
+                    delete mapPlayers[p.id];
+               mapPlayers[p.id] = new Player(p);
 
                break;
@@ -721,6 +732,6 @@
                memcpy(&y, msg.buffer+8, 4);
 
-               mapPlayers[id].target.x = x;
-               mapPlayers[id].target.y = y;
+               mapPlayers[id]->target.x = x;
+               mapPlayers[id]->target.y = y;
 
                break;
@@ -781,5 +792,5 @@
                cout << "target id: " << targetID << endl;
 
-               Player* source = &mapPlayers[id];
+               Player* source = mapPlayers[id];
                source->targetPlayer = targetID;
                source->isChasing = true;
