aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorKudlaty <none@none>2009-10-31 03:33:04 +0100
committerKudlaty <none@none>2009-10-31 03:33:04 +0100
commit717f1aefc99e2bc73537dace2f2c6046aebf42a9 (patch)
tree23226d0979f9d6e0515f2ac2e2f6f477fa999c09 /src/game/Unit.cpp
parente6e621bfada0bd3e254d362f4504357b8799e1de (diff)
*Change virtual bool IsEscorted in escort_ai.h to check if creature is escorted or not
*If creature use POINT_MOTION_TYPE, sethomeposition in combat start point --HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 459d9c40bac..3c0e8a94c20 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -10616,7 +10616,8 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
{
// Set home position at place of engaging combat for escorted creatures
if(( IsAIEnabled && ((Creature*)this)->AI()->IsEscorted() ) ||
- GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
+ GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE ||
+ ((Creature*)this)->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE)
((Creature*)this)->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
if (enemy)