forked from mirror/openmw-tes3mp
Merge pull request #1365 from elsid/fix_dangling_reference
Copy PathFinder::mPath back value when pass to MWMechanics::AiPackage…
This commit is contained in:
commit
954ec38af9
1 changed files with 1 additions and 1 deletions
|
@ -489,7 +489,7 @@ namespace MWMechanics
|
||||||
float duration, AiWanderStorage& storage, ESM::Position& pos)
|
float duration, AiWanderStorage& storage, ESM::Position& pos)
|
||||||
{
|
{
|
||||||
// Is there no destination or are we there yet?
|
// 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);
|
stopWalking(actor, storage);
|
||||||
storage.setState(Wander_ChooseAction);
|
storage.setState(Wander_ChooseAction);
|
||||||
|
|
Loading…
Reference in a new issue