mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 18:39:40 +00:00
fix to broken aiwander logic
This commit is contained in:
parent
e8f7d12c01
commit
9e79fb5b87
3 changed files with 4 additions and 4 deletions
|
@ -539,14 +539,14 @@ namespace MWMechanics
|
||||||
}
|
}
|
||||||
|
|
||||||
void AiWander::trimAllowedNodes(std::vector<ESM::Pathgrid::Point>& nodes,
|
void AiWander::trimAllowedNodes(std::vector<ESM::Pathgrid::Point>& nodes,
|
||||||
PathFinder& pathfinder)
|
const PathFinder& pathfinder)
|
||||||
{
|
{
|
||||||
// TODO: how to add these back in once the door opens?
|
// TODO: how to add these back in once the door opens?
|
||||||
// Idea: keep a list of detected closed doors (see aicombat.cpp)
|
// Idea: keep a list of detected closed doors (see aicombat.cpp)
|
||||||
// Every now and then check whether one of the doors is opened. (maybe
|
// Every now and then check whether one of the doors is opened. (maybe
|
||||||
// at the end of playing idle?) If the door is opened then re-calculate
|
// at the end of playing idle?) If the door is opened then re-calculate
|
||||||
// allowed nodes starting from the spawn point.
|
// allowed nodes starting from the spawn point.
|
||||||
std::list<ESM::Pathgrid::Point>& paths = pathfinder.getPath();
|
std::list<ESM::Pathgrid::Point> paths = pathfinder.getPath();
|
||||||
while(paths.size() >= 2)
|
while(paths.size() >= 2)
|
||||||
{
|
{
|
||||||
ESM::Pathgrid::Point pt = paths.back();
|
ESM::Pathgrid::Point pt = paths.back();
|
||||||
|
|
|
@ -77,7 +77,7 @@ namespace MWMechanics
|
||||||
ESM::Pathgrid::Point mCurrentNode;
|
ESM::Pathgrid::Point mCurrentNode;
|
||||||
bool mTrimCurrentNode;
|
bool mTrimCurrentNode;
|
||||||
void trimAllowedNodes(std::vector<ESM::Pathgrid::Point>& nodes,
|
void trimAllowedNodes(std::vector<ESM::Pathgrid::Point>& nodes,
|
||||||
PathFinder& pathfinder);
|
const PathFinder& pathfinder);
|
||||||
|
|
||||||
PathFinder mPathFinder;
|
PathFinder mPathFinder;
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace MWMechanics
|
||||||
return mPath.size();
|
return mPath.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::list<ESM::Pathgrid::Point>& getPath()
|
const std::list<ESM::Pathgrid::Point>& getPath() const
|
||||||
{
|
{
|
||||||
return mPath;
|
return mPath;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue