Merge pull request #1365 from elsid/fix_dangling_reference

Copy PathFinder::mPath back value when pass to MWMechanics::AiPackage…
0.6.1
scrawl 8 years ago committed by GitHub
commit 954ec38af9

@ -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…
Cancel
Save