*Do not allow chase/follow self.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-12 16:32:03 -05:00
parent a8a0a03b1b
commit 74977d73f3

View File

@@ -245,7 +245,7 @@ void
MotionMaster::MoveChase(Unit* target, float dist, float angle)
{
// ignore movement request if target not exist
if(!target)
if(!target || target == i_owner)
return;
i_owner->clearUnitState(UNIT_STAT_FOLLOW);
@@ -271,7 +271,7 @@ void
MotionMaster::MoveFollow(Unit* target, float dist, float angle)
{
// ignore movement request if target not exist
if(!target)
if(!target || target == i_owner)
return;
i_owner->addUnitState(UNIT_STAT_FOLLOW);