mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
Move AiWander arrival check to time-critical section
This commit is contained in:
parent
7afd2ca614
commit
afbd5162ee
1 changed files with 11 additions and 11 deletions
|
@ -153,6 +153,17 @@ namespace MWMechanics
|
|||
}
|
||||
}
|
||||
|
||||
// Are we there yet?
|
||||
if(mWalking &&
|
||||
mPathFinder.checkPathCompleted(pos.pos[0], pos.pos[1], pos.pos[2]))
|
||||
{
|
||||
stopWalking(actor);
|
||||
mMoveNow = false;
|
||||
mWalking = false;
|
||||
mChooseAction = true;
|
||||
mHasReturnPosition = false;
|
||||
}
|
||||
|
||||
if(mWalking) // have not yet reached the destination
|
||||
{
|
||||
// turn towards the next point in mPath
|
||||
|
@ -524,17 +535,6 @@ namespace MWMechanics
|
|||
}
|
||||
}
|
||||
|
||||
// Are we there yet?
|
||||
if(mWalking &&
|
||||
mPathFinder.checkPathCompleted(pos.pos[0], pos.pos[1], pos.pos[2]))
|
||||
{
|
||||
stopWalking(actor);
|
||||
mMoveNow = false;
|
||||
mWalking = false;
|
||||
mChooseAction = true;
|
||||
mHasReturnPosition = false;
|
||||
}
|
||||
|
||||
return false; // AiWander package not yet completed
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue