*Do not allow chase/follow self.
--HG-- branch : trunk
This commit is contained in:
@@ -245,7 +245,7 @@ void
|
|||||||
MotionMaster::MoveChase(Unit* target, float dist, float angle)
|
MotionMaster::MoveChase(Unit* target, float dist, float angle)
|
||||||
{
|
{
|
||||||
// ignore movement request if target not exist
|
// ignore movement request if target not exist
|
||||||
if(!target)
|
if(!target || target == i_owner)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
i_owner->clearUnitState(UNIT_STAT_FOLLOW);
|
i_owner->clearUnitState(UNIT_STAT_FOLLOW);
|
||||||
@@ -271,7 +271,7 @@ void
|
|||||||
MotionMaster::MoveFollow(Unit* target, float dist, float angle)
|
MotionMaster::MoveFollow(Unit* target, float dist, float angle)
|
||||||
{
|
{
|
||||||
// ignore movement request if target not exist
|
// ignore movement request if target not exist
|
||||||
if(!target)
|
if(!target || target == i_owner)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
i_owner->addUnitState(UNIT_STAT_FOLLOW);
|
i_owner->addUnitState(UNIT_STAT_FOLLOW);
|
||||||
|
|||||||
Reference in New Issue
Block a user