Updated the pathfinding.