Index: common/Player.cpp
===================================================================
--- common/Player.cpp	(revision 8c741508ab5c734f9b7b170f6cc64e940a7a101a)
+++ common/Player.cpp	(revision 11d21ee11d4c61808a4280cdafbf7778a7af72c9)
@@ -17,4 +17,5 @@
    this->timeLastUpdated = 0;
    this->timeAttackStarted = 0;
+   this->isChasing = false;
    this->isAttacking = false;
 
@@ -24,4 +25,5 @@
    this->attackType = ATTACK_NONE;
    this->damage = 0;
+   this->range = 0;
    this->attackCooldown = 0;
    this->team = 0;   // blue team by default
@@ -42,4 +44,5 @@
    this->timeLastUpdated = p.timeLastUpdated;
    this->timeAttackStarted = p.timeAttackStarted;
+   this->isChasing = p.isChasing;
    this->isAttacking = p.isAttacking;
 
@@ -49,4 +52,5 @@
    this->attackType = p.attackType;
    this->damage = p.damage;
+   this->range = p.range;
    this->attackCooldown = p.attackCooldown;
    this->team = p.team;
@@ -65,4 +69,5 @@
    this->timeLastUpdated = 0;
    this->timeAttackStarted = 0;
+   this->isChasing = false;
    this->isAttacking = false;
 
@@ -72,4 +77,5 @@
    this->attackType = ATTACK_NONE;
    this->damage = 0;
+   this->range = 0;
    this->attackCooldown = 0;
    this->team = 0;   // blue team by default
@@ -100,4 +106,5 @@
          this->attackType = ATTACK_MELEE;
          this->damage = 10;
+         this->range = 30;
          this->attackCooldown = 800;
          break;
@@ -107,4 +114,5 @@
          this->attackType = ATTACK_RANGED;
          this->damage = 6;
+         this->range = 100;
          this->attackCooldown = 1000;
          break;
Index: common/Player.h
===================================================================
--- common/Player.h	(revision 8c741508ab5c734f9b7b170f6cc64e940a7a101a)
+++ common/Player.h	(revision 11d21ee11d4c61808a4280cdafbf7778a7af72c9)
@@ -59,4 +59,5 @@
    unsigned long long timeLastUpdated;
    unsigned long long timeAttackStarted;
+   bool isChasing;
    bool isAttacking;
    int targetPlayer;
@@ -67,4 +68,5 @@
    int attackType;
    int damage;
+   int range;
    unsigned long long attackCooldown;
    int team; // 0 is blue, 1 is red
Index: server/server.cpp
===================================================================
--- server/server.cpp	(revision 8c741508ab5c734f9b7b170f6cc64e940a7a101a)
+++ server/server.cpp	(revision 11d21ee11d4c61808a4280cdafbf7778a7af72c9)
@@ -145,7 +145,27 @@
          timeLastUpdated = curTime;
 
+         map<unsigned int, Player>::iterator it;
+
+         // set targets for all chasing players (or make them attack if they're close enough)
+         for (it = mapPlayers.begin(); it != mapPlayers.end(); it++) {
+            Player* p = &it->second;
+
+            if (p->isChasing) {
+               p->target.x = mapPlayers[p->targetPlayer].pos.x;
+               p->target.y = mapPlayers[p->targetPlayer].pos.y;
+
+               if (posDistance(p->pos, p->target.toFloat()) <= p->range) {
+                  p->target.x = p->pos.x;
+                  p->target.y = p->pos.y;
+
+                  p->isChasing = false;
+                  p->isAttacking = true;
+                  p->timeAttackStarted = getCurrentMillis();
+               }
+            }
+         }
+
          // move all players
          // maybe put this in a separate method
-         map<unsigned int, Player>::iterator it;
          FLOAT_POSITION oldPos;
          bool broadcastMove = false;
@@ -778,8 +798,12 @@
 
          Player* source = &mapPlayers[id];
-         source->timeAttackStarted = getCurrentMillis();
          source->targetPlayer = targetId;
-         source->isAttacking = true;
-
+         source->isChasing = true;
+
+         // this is irrelevant since the client doesn't even listen for START_ATTACK messages
+         // actually, the client should not ignore this and should instead perform the same movement
+         // algorithm on its end (following the target player until in range) that the server does.
+         // Once the attacker is in range, the client should stop movement and wait for messages
+         // from the server
          serverMsg.type = MSG_TYPE_START_ATTACK;
          memcpy(serverMsg.buffer, &id, 4);
