*Fix client-server movement sync after knockback effect - by smellbee

*Fix the bug that sometimes creature don't evade, and chase for player to death - by smellbee
*Do not set creature home position to place of engaging in combat

--HG--
branch : trunk
This commit is contained in:
QAston
2009-07-06 19:04:44 +02:00
parent 855c0dc3b2
commit 5e51b3d7cb
3 changed files with 5 additions and 3 deletions

View File

@@ -32,7 +32,8 @@ void PointMovementGenerator<T>::Initialize(T &unit)
unit.StopMoving();
unit.clearUnitState(UNIT_STAT_MOVING);
Traveller<T> traveller(unit);
i_destinationHolder.SetDestination(traveller,i_x,i_y,i_z, !unit.hasUnitState(UNIT_STAT_JUMPING));
// knockback effect has UNIT_STAT_JUMPING set,so if here we disable sentmonstermove there will be creature position sync problem between client and server
i_destinationHolder.SetDestination(traveller,i_x,i_y,i_z, true /* !unit.hasUnitState(UNIT_STAT_JUMPING)*/);
if (unit.GetTypeId() == TYPEID_UNIT && ((Creature*)&unit)->canFly())
unit.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);