Core/Movement: some corrections on WaypointMovementGenerator
Port From (https://github.com/TrinityCore/TrinityCore/commit/88c3a184cc9cfd7457f5c4e5f743161c763cddf7)
This commit is contained in:
@@ -252,16 +252,15 @@ namespace Game.Movement
|
|||||||
|
|
||||||
if (!_nextMoveTime.Passed())
|
if (!_nextMoveTime.Passed())
|
||||||
{
|
{
|
||||||
_nextMoveTime.Update((int)diff);
|
if (creature.MoveSpline.Finalized())
|
||||||
if (_nextMoveTime.Passed())
|
{
|
||||||
return StartMoveNow(creature);
|
_nextMoveTime.Update((int)diff);
|
||||||
|
if (_nextMoveTime.Passed())
|
||||||
|
return StartMoveNow(creature);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Set home position at place on waypoint movement.
|
|
||||||
if (creature.GetTransGUID().IsEmpty())
|
|
||||||
creature.SetHomePosition(creature.GetPosition());
|
|
||||||
|
|
||||||
if (creature.MoveSpline.Finalized())
|
if (creature.MoveSpline.Finalized())
|
||||||
{
|
{
|
||||||
OnArrived(creature);
|
OnArrived(creature);
|
||||||
@@ -270,10 +269,17 @@ namespace Game.Movement
|
|||||||
if (_nextMoveTime.Passed())
|
if (_nextMoveTime.Passed())
|
||||||
return StartMove(creature);
|
return StartMove(creature);
|
||||||
}
|
}
|
||||||
else if (_recalculateSpeed)
|
else
|
||||||
{
|
{
|
||||||
if (_nextMoveTime.Passed())
|
// Set home position at place on waypoint movement.
|
||||||
StartMove(creature);
|
if (creature.GetTransGUID().IsEmpty())
|
||||||
|
creature.SetHomePosition(creature.GetPosition());
|
||||||
|
|
||||||
|
if (_recalculateSpeed)
|
||||||
|
{
|
||||||
|
if (_nextMoveTime.Passed())
|
||||||
|
StartMove(creature);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user