*Check movementflag to interrupt casting instead of checking position.
*Also some other fixes about movement flags. --HG-- branch : trunk
This commit is contained in:
1 parent
4d6fb6c8b2
commit
b9610f27dd
19 files changed
+120
-118
No files matched your search
@@ -132,7 +132,7 @@ TargetedMovementGenerator<T>::_setTargetLocation(T &owner)
|
||||
i_destinationHolder.SetDestination(traveller, x, y, z);
|
||||
owner.addUnitState(UNIT_STAT_CHASE);
|
||||
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
|
||||
owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||
owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
|
||||
i_destinationHolder.StartTravel(traveller);
|
||||
return true;
|
||||
}
|
||||
@@ -147,7 +147,7 @@ TargetedMovementGenerator<T>::Initialize(T &owner)
|
||||
owner.RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
|
||||
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
|
||||
owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||
owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
|
||||
|
||||
_setTargetLocation(owner);
|
||||
}
|
||||
@@ -199,7 +199,7 @@ TargetedMovementGenerator<T>::Update(T &owner, const uint32 & time_diff)
|
||||
{
|
||||
owner.addUnitState(UNIT_STAT_CHASE);
|
||||
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
|
||||
owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||
owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
|
||||
|
||||
i_destinationHolder.StartTravel(traveller);
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user