mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 16:15:31 +00:00
Copy PathFinder::mPath back value when pass to MWMechanics::AiPackage::pathTo as dest
May become dangling reference because method may remove all elements from mPath.
This commit is contained in:
parent
60c7876c3d
commit
748f5225a9
1 changed files with 1 additions and 1 deletions
|
@ -489,7 +489,7 @@ namespace MWMechanics
|
|||
float duration, AiWanderStorage& storage, ESM::Position& pos)
|
||||
{
|
||||
// Is there no destination or are we there yet?
|
||||
if ((!mPathFinder.isPathConstructed()) || pathTo(actor, mPathFinder.getPath().back(), duration, DESTINATION_TOLERANCE))
|
||||
if ((!mPathFinder.isPathConstructed()) || pathTo(actor, ESM::Pathgrid::Point(mPathFinder.getPath().back()), duration, DESTINATION_TOLERANCE))
|
||||
{
|
||||
stopWalking(actor, storage);
|
||||
storage.setState(Wander_ChooseAction);
|
||||
|
|
Loading…
Reference in a new issue