diff options
author | megamage <none@none> | 2009-01-17 17:46:28 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-01-17 17:46:28 -0600 |
commit | 9f1409c557c4ef6edc2bb9b54c6ad0463beb20db (patch) | |
tree | aaa732818364d49fa07769b2c22e54ff37fb6f76 /src/game/PointMovementGenerator.cpp | |
parent | ff3157eeb3802e06183edb23c2842d152bf79662 (diff) |
*Fix a crash bug caused by motionmaster.
*Fix charge movement.
--HG--
branch : trunk
Diffstat (limited to 'src/game/PointMovementGenerator.cpp')
-rw-r--r-- | src/game/PointMovementGenerator.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/game/PointMovementGenerator.cpp b/src/game/PointMovementGenerator.cpp index 54fcba4898e..31b696bcd3b 100644 --- a/src/game/PointMovementGenerator.cpp +++ b/src/game/PointMovementGenerator.cpp @@ -44,7 +44,12 @@ bool PointMovementGenerator<T>::Update(T &unit, const uint32 &diff) return false; if(unit.hasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED)) - return true; + { + if(unit.hasUnitState(UNIT_STAT_CHARGING)) + return false; + else + return true; + } Traveller<T> traveller(unit); @@ -53,7 +58,8 @@ bool PointMovementGenerator<T>::Update(T &unit, const uint32 &diff) if(i_destinationHolder.HasArrived()) { unit.StopMoving(); - MovementInform(unit); + if(!unit.hasUnitState(UNIT_STAT_CHARGING)) + MovementInform(unit); return false; } |