*Fix a crash bug caused by motionmaster.

*Fix charge movement.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-01-17 17:46:28 -06:00
parent ff3157eeb3
commit 9f1409c557
12 changed files with 81 additions and 106 deletions

View File

@@ -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;
}