mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04:00
AIWander Patch - fixed another possibility of a bug occuring, best to fix it now then wait until it happens.
This commit is contained in:
parent
bd6d54cc8f
commit
ebc1fdd017
@ -92,7 +92,10 @@ bool MWMechanics::AiWander::execute (const MWWorld::Ptr& actor)
|
|||||||
mCellX = actor.getCell()->mCell->mData.mX;
|
mCellX = actor.getCell()->mCell->mData.mX;
|
||||||
mCellY = actor.getCell()->mCell->mData.mY;
|
mCellY = actor.getCell()->mCell->mData.mY;
|
||||||
|
|
||||||
if(mDistance && !mPathgrid->mPoints.empty())
|
if(mPathgrid->mPoints.empty())
|
||||||
|
mDistance = 0;
|
||||||
|
|
||||||
|
if(mDistance)
|
||||||
{
|
{
|
||||||
mXCell = 0;
|
mXCell = 0;
|
||||||
mYCell = 0;
|
mYCell = 0;
|
||||||
@ -126,10 +129,9 @@ bool MWMechanics::AiWander::execute (const MWWorld::Ptr& actor)
|
|||||||
}
|
}
|
||||||
mCurrentNode = mAllowedNodes[index];
|
mCurrentNode = mAllowedNodes[index];
|
||||||
mAllowedNodes.erase(mAllowedNodes.begin() + index);
|
mAllowedNodes.erase(mAllowedNodes.begin() + index);
|
||||||
if(mAllowedNodes.empty())
|
|
||||||
mDistance = 0;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if(mAllowedNodes.empty())
|
||||||
mDistance = 0;
|
mDistance = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user