aboutsummaryrefslogtreecommitdiff
path: root/src/game/PointMovementGenerator.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-17 17:46:28 -0600
committermegamage <none@none>2009-01-17 17:46:28 -0600
commit9f1409c557c4ef6edc2bb9b54c6ad0463beb20db (patch)
treeaaa732818364d49fa07769b2c22e54ff37fb6f76 /src/game/PointMovementGenerator.cpp
parentff3157eeb3802e06183edb23c2842d152bf79662 (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.cpp10
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;
}