Core/Misc: movement cleanup

Port From (https://github.com/TrinityCore/TrinityCore/commit/4793b073eec2af32622ff703911721100730e868)
This commit is contained in:
hondacrx
2021-09-26 12:17:10 -04:00
parent e747de7608
commit 569e20ebc1
12 changed files with 76 additions and 48 deletions
@@ -257,7 +257,7 @@ namespace Game.Movement
// check if there is a wait time for the next movement
if (!_nextMoveTime.Passed())
{
// dont update wait timer while moving
// update timer since it's not moving
_nextMoveTime.Update((int)diff);
if (_nextMoveTime.Passed())
{
@@ -268,7 +268,7 @@ namespace Game.Movement
else // if it's not moving and there is no timer, assume node is reached
{
OnArrived(creature); // hooks and wait timer reset (if necessary)
_isArrivalDone = true; // signals that the next move will happen after reaching a node
_isArrivalDone = true; // signals to future StartMove that it reached a node
if (_nextMoveTime.Passed())
StartMove(creature); // check path status, get next point and move if necessary & can