1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Merge remote-tracking branch 'torben/aiwanderpatchpotential'

This commit is contained in:
Marc Zinnschlag 2013-05-27 18:29:15 +02:00
commit 7927ac818c

View file

@ -92,7 +92,10 @@ bool MWMechanics::AiWander::execute (const MWWorld::Ptr& actor)
mCellX = actor.getCell()->mCell->mData.mX;
mCellY = actor.getCell()->mCell->mData.mY;
if(mDistance && !mPathgrid->mPoints.empty())
if(mPathgrid->mPoints.empty())
mDistance = 0;
if(mDistance)
{
mXCell = 0;
mYCell = 0;
@ -126,10 +129,9 @@ bool MWMechanics::AiWander::execute (const MWWorld::Ptr& actor)
}
mCurrentNode = mAllowedNodes[index];
mAllowedNodes.erase(mAllowedNodes.begin() + index);
if(mAllowedNodes.empty())
mDistance = 0;
}
else
if(mAllowedNodes.empty())
mDistance = 0;
}
}