diff options
author | megamage <none@none> | 2009-03-18 15:31:44 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-18 15:31:44 -0600 |
commit | 82777554a0a14a73e2dc9ffcda662ad89408b229 (patch) | |
tree | c5b28e3501d4256fa2257b41a001e5ad5f97d375 /src/game/PointMovementGenerator.cpp | |
parent | 838ad6d847b5058a4eb9fd1be8496bf7ed4ca601 (diff) | |
parent | dbd69bda613faed2cc30ba95de5c07235ae73653 (diff) |
*Merge with 243.
--HG--
branch : trunk
Diffstat (limited to 'src/game/PointMovementGenerator.cpp')
-rw-r--r-- | src/game/PointMovementGenerator.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/game/PointMovementGenerator.cpp b/src/game/PointMovementGenerator.cpp index 70c2c4d966e..adaaf9afbfc 100644 --- a/src/game/PointMovementGenerator.cpp +++ b/src/game/PointMovementGenerator.cpp @@ -56,9 +56,7 @@ bool PointMovementGenerator<T>::Update(T &unit, const uint32 &diff) if(i_destinationHolder.HasArrived()) { - //unit.StopMoving(); - if(!unit.hasUnitState(UNIT_STAT_CHARGING)) - MovementInform(unit); + arrived = true; return false; } @@ -66,6 +64,15 @@ bool PointMovementGenerator<T>::Update(T &unit, const uint32 &diff) } template<class T> +void PointMovementGenerator<T>:: Finalize(T &unit) +{ + if(unit.hasUnitState(UNIT_STAT_CHARGING)) + unit.clearUnitState(UNIT_STAT_CHARGING); + else if(arrived) + MovementInform(unit); +} + +template<class T> void PointMovementGenerator<T>::MovementInform(T &unit) { } @@ -78,7 +85,8 @@ template <> void PointMovementGenerator<Creature>::MovementInform(Creature &unit template void PointMovementGenerator<Player>::Initialize(Player&); template bool PointMovementGenerator<Player>::Update(Player &, const uint32 &diff); template void PointMovementGenerator<Player>::MovementInform(Player&); +template void PointMovementGenerator<Player>::Finalize(Player&); template void PointMovementGenerator<Creature>::Initialize(Creature&); template bool PointMovementGenerator<Creature>::Update(Creature&, const uint32 &diff); - +template void PointMovementGenerator<Creature>::Finalize(Creature&); |