*Send stop packet iff necessary. Hope this can fix the bug that cannot immediatly remove confuse movement and face wrong direction after charging.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-05-01 21:04:02 -05:00
1 parent c9cd3b07f9
commit a102098eb2
12 files changed
+54 -48

No files matched your search

+7 -2
View File
@@ -23,14 +23,19 @@
IdleMovementGenerator si_idleMovement;
// StopMoving is needed to make unit stop if its last movement generator expires
// But it should not be sent otherwise there are many redundent packets
void IdleMovementGenerator::Initialize(Unit &owner)
{
owner.StopMoving();
if(owner.hasUnitState(UNIT_STAT_MOVE))
owner.StopMoving();
}
void
IdleMovementGenerator::Reset(Unit& /*owner*/)
IdleMovementGenerator::Reset(Unit& owner)
{
if(owner.hasUnitState(UNIT_STAT_MOVE))
owner.StopMoving();
}
void