Index: common/Player.cpp
===================================================================
--- common/Player.cpp	(revision d05c484ad45624d2cced5f91c67c529bdda686c1)
+++ common/Player.cpp	(revision d998572d2b8fca258d9a75165638a41951561866)
@@ -217,8 +217,8 @@
 }
 
-bool Player::updateTarget(map<unsigned int, Player*>& mapPlayers) {
+bool Player::updateTarget(const Player* targetPlayer) {
    if (this->isChasing) {
-      this->target.x = mapPlayers[this->targetPlayer]->pos.x;
-      this->target.y = mapPlayers[this->targetPlayer]->pos.y;
+      this->target.x = targetPlayer->pos.x;
+      this->target.y = targetPlayer->pos.y;
 
       if (posDistance(this->pos, this->target.toFloat()) <= this->range) {
Index: common/Player.h
===================================================================
--- common/Player.h	(revision d05c484ad45624d2cced5f91c67c529bdda686c1)
+++ common/Player.h	(revision d998572d2b8fca258d9a75165638a41951561866)
@@ -48,5 +48,5 @@
    void deserialize(char* buffer);
 
-   bool updateTarget(map<unsigned int, Player*>& mapPlayers);
+   bool updateTarget(const Player* targetPlayer);
    bool move(WorldMap *map);
    void takeDamage(int damage);
