diff --git a/apps/openmw/mwmechanics/aiwander.cpp b/apps/openmw/mwmechanics/aiwander.cpp index a3fdc69cc..8231e572e 100644 --- a/apps/openmw/mwmechanics/aiwander.cpp +++ b/apps/openmw/mwmechanics/aiwander.cpp @@ -730,6 +730,8 @@ namespace MWMechanics const ESM::Pathgrid * pathgrid = MWBase::Environment::get().getWorld()->getStore().get().search(*cell); + mAllowedNodes.clear(); + // If there is no path this actor doesn't go anywhere. See: // https://forum.openmw.org/viewtopic.php?t=1556 // http://www.fliggerty.com/phpBB3/viewtopic.php?f=30&t=5833 diff --git a/apps/openmw/mwmechanics/aiwander.hpp b/apps/openmw/mwmechanics/aiwander.hpp index b0fabfce3..683c04bb0 100644 --- a/apps/openmw/mwmechanics/aiwander.hpp +++ b/apps/openmw/mwmechanics/aiwander.hpp @@ -120,16 +120,20 @@ namespace MWMechanics MWWorld::TimeStamp mStartTime; // allowed pathgrid nodes based on mDistance from the spawn point + // in local coordinates of mCell + // FIXME: move to AiWanderStorage std::vector mAllowedNodes; void getAllowedNodes(const MWWorld::Ptr& actor, const ESM::Cell* cell); + // FIXME: move to AiWanderStorage ESM::Pathgrid::Point mCurrentNode; bool mTrimCurrentNode; void trimAllowedNodes(std::vector& nodes, const PathFinder& pathfinder); + // FIXME: move to AiWanderStorage // ObstacleCheck mObstacleCheck; float mDoorCheckDuration; int mStuckCount;