diff options
author | megamage <none@none> | 2009-03-23 15:26:13 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-23 15:26:13 -0600 |
commit | ba957ed9f476a39f5bbea621814bbe191493428c (patch) | |
tree | ed4eca5202986ac53997c10c783fb7f649611645 /src/game/PointMovementGenerator.cpp | |
parent | 41a73f284beb26819f75da5c10f174fb24c57bc4 (diff) |
*Allow knockback creatures.
--HG--
branch : trunk
Diffstat (limited to 'src/game/PointMovementGenerator.cpp')
-rw-r--r-- | src/game/PointMovementGenerator.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/PointMovementGenerator.cpp b/src/game/PointMovementGenerator.cpp index adaaf9afbfc..084dad7cfa8 100644 --- a/src/game/PointMovementGenerator.cpp +++ b/src/game/PointMovementGenerator.cpp @@ -28,9 +28,10 @@ template<class T> void PointMovementGenerator<T>::Initialize(T &unit) { - unit.StopMoving(); + //unit.StopMoving(); + unit.clearUnitState(UNIT_STAT_MOVING); Traveller<T> traveller(unit); - i_destinationHolder.SetDestination(traveller,i_x,i_y,i_z); + i_destinationHolder.SetDestination(traveller,i_x,i_y,i_z, !unit.hasUnitState(UNIT_STAT_JUMPING)); if (unit.GetTypeId() == TYPEID_UNIT && ((Creature*)&unit)->canFly()) unit.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2); @@ -67,7 +68,7 @@ template<class T> void PointMovementGenerator<T>:: Finalize(T &unit) { if(unit.hasUnitState(UNIT_STAT_CHARGING)) - unit.clearUnitState(UNIT_STAT_CHARGING); + unit.clearUnitState(UNIT_STAT_CHARGING | UNIT_STAT_JUMPING); else if(arrived) MovementInform(unit); } |